Most of my Symfony app is separated in two sub-directories for each bundle's controllers "Frontend" and "Backend". What I want to do is have 2 different error pages for frontend and backend 404 errors. Its quite easy to just override the generic twig error template but I was wondering whats the best approach to determine whether it should render the frontend or backend error template. Do I have to rewrite the Twig exception handling for that or there is some built-in functionality do kinda accomplish that. Thanks!