-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Proper handling of Ajax exceptions #999
Conversation
@msimkunas should this perhaps only occur when in production mode? |
I don't see much benefit in handling these cases differently. The actual error will be logged regardless. |
I think it makes sense to handle debug/prod mode differently when it comes to regular error handling because in those cases the developer is presented with a detailed stack trace and debugging info when in debug mode. This case, however, is different. We're not showing any kind of detailed debugging info, such as a stack trace, inside the client side error alert so the developer will be forced regardless to go through the logs manually. Showing just the exception message isn't really all that helpful to a developer so I would suggest to not differentiate between dev modes in this particular case. |
@msimkunas this may have an effect on client-side error reporting. Immediately, I can think this might affect the Debugbar plugin, because it has some special handling for exceptions thrown in an AJAX call but might not necessarily be able to handle linked/previous exceptions (it also has some special handling for If I'm wrong and the Debugbar handles it fine, I'm happy for this PR to proceed. |
@bennothommo I've discussed this with @LukeTowers and he suggested throwing an I haven't yet tested this but I'll give it a go soon |
@msimkunas sounds good to me. :) |
I didn't think of the debugbar plugin, that would be a good point. |
@msimkunas were you able to take a stab at this? |
@LukeTowers Not yet but I'll try to after the holidays |
This pull request will be closed and archived in 3 days, as there has been no activity in this pull request for the last 6 months. |
@msimkunas are you still interested in making the necessary modifications to get this merged? |
Also should we add this handling logic to the backend controller base class as well? |
@LukeTowers I’m sorry but my plans have changed and I’m no longer working on this. Maybe someone else can pick up the mantle… |
Unhandled exceptions in Ajax handlers are currently relayed back to the user. Since they can potentially contain sensitive details about the system, such as absolute file paths, these exceptions should be properly masked.
Depends on wintercms/storm#160.