From 5352a1becfb0b5d01aa34665cf0a73db91cba0d7 Mon Sep 17 00:00:00 2001 From: Ante de Baas Date: Thu, 14 Nov 2024 01:51:35 +0100 Subject: [PATCH] HTTP_UNAUTHORIZED on unauthorized message --- src/EventListener/KernelExceptionListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventListener/KernelExceptionListener.php b/src/EventListener/KernelExceptionListener.php index af88a82..f897921 100644 --- a/src/EventListener/KernelExceptionListener.php +++ b/src/EventListener/KernelExceptionListener.php @@ -31,7 +31,7 @@ public function onKernelException(ExceptionEvent $event) case $exception instanceof \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: $response = new Response( $this->templating->render('base/error.html.twig',['page' => array('title'=> 'Unauthorized'), 'message' => "Nope! Access denied!"]), - Response::HTTP_INTERNAL_SERVER_ERROR + Response::HTTP_UNAUTHORIZED ); break; default: