Skip to content

Commit

Permalink
chore: fix error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
christyjacob4 committed Oct 13, 2024
1 parent 7b02500 commit c2b5c11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,11 @@ function (string $runtimeId, ?string $payload, string $path, string $method, mix
->inject('response')
->inject('log')
->action(function (?Route $route, Throwable $error, ?Logger $logger, Response $response, Log $log) {
logError($log, $error, "httpError", $logger, $route);
try {
logError($log, $error, "httpError", $logger, $route);
} catch (Throwable) {
Console::warning('Unable to send log message');
}

$version = System::getEnv('OPR_EXECUTOR_VERSION', 'UNKNOWN');
$message = $error->getMessage();
Expand Down

0 comments on commit c2b5c11

Please sign in to comment.