Skip to content

Commit

Permalink
refactor: add bugsnag error logging to UpdateMember job (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
AxonC authored Feb 19, 2024
1 parent 67b1390 commit 94738b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Jobs/UpdateMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 94738b7

Please sign in to comment.