1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02: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;
use App\Models\Company;
use App\Models\Product;
use Illuminate\Queue\SerializesModels;

View File

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

View File

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

12
composer.lock generated
View File

@ -116,16 +116,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.168.2",
"version": "3.168.3",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "1d6a976da857d13b156bd63613ee086c13f6dc29"
"reference": "49ef1f905388c8185012c9651b80941b8f2a218d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/1d6a976da857d13b156bd63613ee086c13f6dc29",
"reference": "1d6a976da857d13b156bd63613ee086c13f6dc29",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/49ef1f905388c8185012c9651b80941b8f2a218d",
"reference": "49ef1f905388c8185012c9651b80941b8f2a218d",
"shasum": ""
},
"require": {
@ -200,9 +200,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"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",