Skip to content

Commit

Permalink
Merge pull request #36 from open-runtimes/fix-error-handler
Browse files Browse the repository at this point in the history
chore: update error handler
  • Loading branch information
christyjacob4 authored Oct 13, 2024
2 parents 30b5088 + ba7bdef commit e5bd4ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,12 @@ function logError(Throwable $error, string $action, ?Logger $logger, Route $rout
->inject('response')
->action(function (Http $utopia, throwable $error, ?Logger $logger, Request $request, Response $response) {
$route = $utopia->match($request);
logError($error, "httpError", $logger, $route);
try {
logError($error, "httpError", $logger, $route);
} catch (Throwable) {
Console::warning('Unable to send log message');
}


$version = (string) Http::getEnv('OPR_PROXY_VERSION') ?: 'UNKNOWN';
$message = $error->getMessage();
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e5bd4ad

Please sign in to comment.