Skip to content

Commit

Permalink
Set 500 HTTP code on error
Browse files Browse the repository at this point in the history
  • Loading branch information
jvillafanez committed Nov 28, 2019
1 parent d1fe5d2 commit 6910328
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
} catch (\Exception $ex2) {
// with some env issues, it can happen that the logger couldn't log properly,
// so print out the exception directly
// NOTE: If we've reached this point, something has gone really wrong because
// we couldn't even get the logger, so don't rely on ownCloud here.
\http_response_code(500);
echo('<html><body>');
echo('Exception occurred while logging exception: ' . $ex->getMessage() . '<br/>');
echo(\str_replace("\n", '<br/>', $ex->getTraceAsString()));
Expand Down

0 comments on commit 6910328

Please sign in to comment.