BF validation

This commit is contained in:
Fabian @ Blax Software 2026-05-03 10:33:58 +02:00
parent f40d183271
commit cda4d34086
1 changed files with 10 additions and 3 deletions

View File

@ -170,10 +170,17 @@ class Controller
'line' => $e->getFile() . ':' . $e->getLine(), 'line' => $e->getFile() . ':' . $e->getLine(),
'stack' => $e->getTraceAsString(), 'stack' => $e->getTraceAsString(),
]; ];
Log::error($e->getMessage(), $reload);
if (app()->bound('sentry')) { $isValidation = $e instanceof \Illuminate\Validation\ValidationException;
app('sentry')->captureException($e);
if ($isValidation) {
Log::info('WS validation failed: ' . $e->getMessage(), $reload);
} else {
Log::error($e->getMessage(), $reload);
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
} }
return self::send_error($connection, $message, $e->getMessage(), true); return self::send_error($connection, $message, $e->getMessage(), true);