Answer the question
In order to leave comments, you need to log in
`
How to properly handle exceptions in Symfony?
When using ` $this->denyAccessUnlessGranted() ` an Access Denied Exception is thrown and goes straight to prod.log resulting in a bunch of 401 403 and 400 request.ERROR: Uncaught PHP Exception
Is this normal? The log swells with meaningless information.
Answer the question
In order to leave comments, you need to log in
You can exclude logging of certain HTTP codes
https://symfony.com/doc/current/logging/monolog_ex...
Or more flexible by creating your own activation_strategy
https://github.com/symfony/monolog-bundle/issues/8.. .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question