Skip to content

Commit b75a19e

Browse files
authored
Increasing LiveComponentSubscriber ExceptionEvent priority to avoid unnecessary logging
The core ErrorListener has a priority of 0. By making our subscriber run first, it avoids unnecessary logging of UnprocessableEntityHttpException
1 parent 7052537 commit b75a19e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LiveComponent/src/EventListener/LiveComponentSubscriber.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ public static function getSubscribedEvents(): array
297297
ControllerEvent::class => 'onKernelController',
298298
ViewEvent::class => 'onKernelView',
299299
ResponseEvent::class => 'onKernelResponse',
300-
ExceptionEvent::class => 'onKernelException',
300+
// priority so that the exception is processed before it can be logged as an error
301+
ExceptionEvent::class => ['onKernelException', 20],
301302
];
302303
}
303304

0 commit comments

Comments
 (0)