Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Change {% exit 404 %} Behavior #3915

Closed
mattcdavis1 opened this issue Feb 26, 2019 · 2 comments
Closed

[Feature Request]: Change {% exit 404 %} Behavior #3915

mattcdavis1 opened this issue Feb 26, 2019 · 2 comments

Comments

@mattcdavis1
Copy link

Currently, when i use {% exit 404 %} in a template, a yii\web\HttpException is thrown which then causes a Twig_Error_Runtime exception to be thrown. This differs from how a normal 404 is handle where a yii\web\NotFoundHttpException is thrown.

Although the end result is the same (404 response code + rendering of 404 template), the generic Twig_Error_Runtime exception that is thrown makes exception notification reporting difficult (i.e. Bugsnag). Ideally, i don't want to ignore Twig_Error_Runtime exceptions but right now i have to or i'll get overwhelmed with notifications from 404s.

If there's some better way of handling this with the existing functionality please let me know. I'm using the Superbig Bugsnag Plugin currently.

@brandonkelly
Copy link
Member

Done for the next release!

@mattcdavis1
Copy link
Author

great - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants