You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the Routing guide, the recommended way to forward exceptions to a web service is in the after_dispatch hook:
# Forward exceptions to a web service$app->hook(after_dispatch=>sub ($c) {
returnunlessmy$e = $c->stash('exception');
$c->ua->post('https://example.com/bugs'=>form=> {exception=>$e});
});
However, when the exception_format is set to json, the exception is not available in the stash, so it is not possible to forward exceptions to a web service using the same technique. I'm not sure if this would be considered a bug or just a limitation of using json format exceptions.
The text was updated successfully, but these errors were encountered:
Steps to reproduce the behavior
According to the Routing guide, the recommended way to forward exceptions to a web service is in the
after_dispatch
hook:https://docs.mojolicious.org/Mojolicious/Guides/Routing#Hooks
However, when the
exception_format
is set tojson
, the exception is not available in the stash, so it is not possible to forward exceptions to a web service using the same technique. I'm not sure if this would be considered a bug or just a limitation of using json format exceptions.The text was updated successfully, but these errors were encountered: