Skip to content

Commit

Permalink
ADD PSR-3 exception error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
srjlewis committed Oct 31, 2024
1 parent db498ad commit 4bdad0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonRPC/Response/ResponseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ protected function handleExceptions()

protected function logException(\Exception $e): void
{
if ($e->getCode() < -32099 && $e->getCode() > -32000 && $this->psr3Logger) {
if (!($e->getCode() >= -32099 && $e->getCode() <= -32000) && $this->psr3Logger) {
$this->psr3Logger->error(
$e->getMessage(),
['file' => $e->getFile(), 'line' => $e->getLine(), 'trace' => $e->getTrace()]
Expand Down

0 comments on commit 4bdad0e

Please sign in to comment.