From 94738b752f570fb372ed6f65887372ceeceb7f77 Mon Sep 17 00:00:00 2001 From: Callum Axon Date: Mon, 19 Feb 2024 20:46:48 +0000 Subject: [PATCH] refactor: add bugsnag error logging to UpdateMember job (#3478) --- app/Jobs/UpdateMember.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Jobs/UpdateMember.php b/app/Jobs/UpdateMember.php index ef4ca35bee..a4dc4e25cb 100644 --- a/app/Jobs/UpdateMember.php +++ b/app/Jobs/UpdateMember.php @@ -7,6 +7,7 @@ use App\Jobs\Middleware\RateLimited; use App\Models\Mship\Account; use App\Models\Mship\Qualification as QualificationData; +use Bugsnag\BugsnagLaravel\Facades\Bugsnag; use Carbon\Carbon; use DB; use Illuminate\Contracts\Queue\ShouldQueue; @@ -79,6 +80,13 @@ public function handle() 'cid' => $response['id'], ]; } catch (\Exception $e) { + Bugsnag::notifyException($e, function ($report) { + $report->setSeverity('error'); + $report->setMetaData([ + 'accountID' => $this->accountID, + ]); + }); + return; }