<?phpnamespace App\EventListener;use Lexik\Bundle\JWTAuthenticationBundle\Event\JWTNotFoundEvent;use Symfony\Component\HttpFoundation\JsonResponse;class JWTNotFoundListener{ public function onJWTNotFound(JWTNotFoundEvent $event) { $data = [ 'status' => false, 'msg' => ['Parece que no se ha encontrado el usuario, por favor inicie sesión.'], 'data' => [], ]; $response = new JsonResponse($data, 500); $event->setResponse($response); }}