Auditing: wrap audit notification in try catch

This commit is contained in:
Marcus Moore
2026-06-09 11:04:22 -07:00
parent e430e4e6e2
commit 82fa1d7a26
+10 -1
View File
@@ -476,7 +476,16 @@ trait Loggable
]);
}
} else {
Setting::getSettings()->notify(new AuditNotification($params));
try {
Setting::getSettings()->notify(new AuditNotification($params));
} catch (Throwable $e) {
Log::error('Audit webhook notification failed', [
'endpoint' => Setting::getSettings()->webhook_endpoint,
'channel' => Setting::getSettings()->webhook_selected,
'exception' => get_class($e),
'error' => $e->getMessage(),
]);
}
}
return $log;