1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for sentry reporting

This commit is contained in:
David Bomba 2020-12-14 07:37:29 +11:00
parent 0f86b3ec21
commit 2c4aaa2131
4 changed files with 14 additions and 16 deletions

View File

@ -11,6 +11,7 @@
namespace App\Events\Product; namespace App\Events\Product;
use App\Models\Company;
use App\Models\Product; use App\Models\Product;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View File

@ -67,7 +67,8 @@ class Handler extends ExceptionHandler
* @throws Throwable * @throws Throwable
*/ */
public function report(Throwable $exception) public function report(Throwable $exception)
{info("errrrrrrrrrrrrrrrrrr"); {
if (! Schema::hasTable('accounts')) { if (! Schema::hasTable('accounts')) {
info('account table not found'); info('account table not found');
return; return;
@ -90,8 +91,6 @@ class Handler extends ExceptionHandler
} }
}); });
// app('sentry')->setRelease(config('ninja.app_version'));
if($this->validException($exception)) if($this->validException($exception))
app('sentry')->captureException($exception); app('sentry')->captureException($exception);
} }
@ -101,17 +100,15 @@ class Handler extends ExceptionHandler
private function validException($exception) private function validException($exception)
{ {
info("valid exception = " .$exception->getMessage());
if(strpos($exception->getMessage(), 'file_put_contents') === TRUE) if(strpos($exception->getMessage(), 'file_put_contents') !== FALSE)
return FALSE; return FALSE;
if(strpos($exception->getMessage(), 'Permission denied') === TRUE) if(strpos($exception->getMessage(), 'Permission denied') !== FALSE)
return FALSE;
if(strpos($exception->getMessage(), 'flock()') === TRUE)
return FALSE; return FALSE;
if(strpos($exception->getMessage(), 'flock()') !== FALSE)
return FALSE;
return TRUE; return TRUE;
} }

View File

@ -167,6 +167,6 @@ class CreateEntityPdf implements ShouldQueue
public function failed(\Exception $exception) public function failed(\Exception $exception)
{ {
info("help!");
} }
} }

12
composer.lock generated
View File

@ -116,16 +116,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.168.2", "version": "3.168.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "1d6a976da857d13b156bd63613ee086c13f6dc29" "reference": "49ef1f905388c8185012c9651b80941b8f2a218d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/1d6a976da857d13b156bd63613ee086c13f6dc29", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/49ef1f905388c8185012c9651b80941b8f2a218d",
"reference": "1d6a976da857d13b156bd63613ee086c13f6dc29", "reference": "49ef1f905388c8185012c9651b80941b8f2a218d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -200,9 +200,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.168.2" "source": "https://github.com/aws/aws-sdk-php/tree/3.168.3"
}, },
"time": "2020-12-10T19:35:18+00:00" "time": "2020-12-11T19:12:18+00:00"
}, },
{ {
"name": "brick/math", "name": "brick/math",