Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
36 | { |
||
37 | try { |
||
38 | return $next($request, $response); |
||
39 | } catch (JsonException $e) { |
||
40 | return $this->renderer->jsonApiRender($response, $e->statusCode, $e->encodeError()); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |