I am making a project in Symfony 5 where there are multiple roles with different privileges. The problem is that when a user tries to log in a zone where they don't have enough privileges (e.g. a USER in an ADMIN only zone) it throws an Access Denied exception and I want to show a custom message instead of the Symfony error screen.
The security part has been done with the access_control method (in case that helps). I've tried following the docs related to this matter but I can't find the way to solve it.