Skip to content

Commit

Permalink
fix 500
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmorbo committed Nov 14, 2023
1 parent 249c336 commit 65364a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/Controller/InstanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
use AlexMorbo\React\Trassir\Router\Router;
use AlexMorbo\React\Trassir\Traits\DBTrait;
use AlexMorbo\React\Trassir\TrassirHelper;
use AlexMorbo\Trassir\TrassirException;
use Clue\React\SQLite\DatabaseInterface;
use Exception;
use Fig\Http\Message\StatusCodeInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Log\LoggerInterface;
use React\Http\Message\Response;
Expand Down
3 changes: 2 additions & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use AlexMorbo\React\Trassir\Controller\InfoController;
use AlexMorbo\React\Trassir\Controller\InstanceController;
use AlexMorbo\React\Trassir\Router\Router;
use AlexMorbo\Trassir\TrassirException;
use Clue\React\SQLite\DatabaseInterface;
use Clue\React\SQLite\Factory;
use Exception;
Expand Down Expand Up @@ -147,7 +148,7 @@ function (ServerRequestInterface $request) use ($router) {

return $response;
})
->catch(function (NotFoundHttpException $e) {
->catch(function (NotFoundHttpException|TrassirException $e) {
return Response::json([
'status' => 'error',
'error' => $e->getMessage(),
Expand Down

0 comments on commit 65364a2

Please sign in to comment.