| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function onKernelException(ExceptionEvent $event): void |
||
| 14 | { |
||
| 15 | $exception = $event->getThrowable(); |
||
| 16 | if ($exception instanceof TokenNotFoundException) { |
||
| 17 | $customResponse = new JsonResponse([ |
||
| 18 | 'status' => 'fail', 'message' => $exception->getMessage(), |
||
| 19 | ], 419); |
||
| 20 | $event->setResponse($customResponse); |
||
| 21 | } |
||
| 24 |