As I said before I can not provide template named exception.format.my_handler
Thus I try to workaround this. I hook into before_render and did as adviced in guide:
https://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages
# Make sure we are rendering the exception template
return unless my $template = $args->{template};
return unless $template eq 'exception';
MY CODE HERE
But becuase of I have 'exception.development.html.ep' it take precedence
and MY CODE never called. Because 'exception.development' tried first:
https://metacpan.org/source/SRI/Mojolicious-7.81/lib/Mojolicious/Plugin/DefaultHelpers.pm#L119
maybe try finding the commit that originally introduced it
and understanding what it was for
before wasting other people's time
try understanding why the tests that break when you remove it work that way
As I said before I can not provide template named exception.format.my_handler