diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-04-18 07:54:33 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-04-18 07:54:33 +0000 |
| commit | 92f2cf7d0b05af98b9c9fc7708004f39cad2e89e (patch) | |
| tree | c821ccfef6eaa9b9e421050308f26b0ca3f61cc0 /lib | |
| parent | 3a8c5c998b1ffb0b857a19834069fc9467307172 (diff) | |
log errors in jsonapi as well, fixes #614
Closes #614
Merge request studip/studip!1720
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/JsonApi/Errors/ErrorHandler.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/classes/JsonApi/Errors/ErrorHandler.php b/lib/classes/JsonApi/Errors/ErrorHandler.php index 04224de..eed747b 100644 --- a/lib/classes/JsonApi/Errors/ErrorHandler.php +++ b/lib/classes/JsonApi/Errors/ErrorHandler.php @@ -40,6 +40,10 @@ class ErrorHandler $code = $this->determineStatusCode($exception, $request->getMethod()); + if ($code >= 500) { + error_log($exception); + } + return $response->withStatus($code); } |
