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
Trigger errors from AJAX methods in non-production mode. #3267
Trigger errors from AJAX methods in non-production mode. #3267
Conversation
Note that I intentionally chose to compare with 'production' instead of 'development' so that you can run Mink tests with e.g. 'preproduction' to enable error triggers but keep Whoops disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts...
@demiankatz How about this? Real errors would prevent a response from being generated. Warnings and notices would be logged normally while prevented from being displayed. This would ensure that PHP settings are otherwise in effect just like in all other controllers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @EreMaijala, this seems like a reasonable solution to me! I'll make a note about it in the changelog.
Errors in AJAX request could easily go undetected (e.g. #3266) because they were only in the
php_errors
element in AJAX responses. This change makes it so that in non-production mode any errors go through the normal triggers so that they can cause the request to fail and the error to be triggered in debugger.