-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Include exception causes into log messages #50145
Include exception causes into log messages #50145
Conversation
7a54ffa
to
7f518eb
Compare
Can we achieve this at the reporting end? |
Can you elaborate? Yes, |
I'm claiming that it shouldn't be up to the wrapper exception to store & regurgitate the wrapped exception's message -- if the |
Agree that this is |
I am stuck. Can you please point me where to look in the code to implement this fix? |
@fatkodima depends what you means exactly, but for what prints the error in the console, it's at rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb Lines 133 to 149 in e7ea111
|
But the standard debug HTML page would also be updated to display the error cause(s) if it exist. |
7f518eb
to
4fc2df2
Compare
Debug HTML page and console already print exception causes, it was only missing in the log messages. |
Fixes #50125.
#39723 changed bad connection related errors so that we now have some (useful for debugging) details from the original database exceptions lost.
This PR adds original database errors to these new exceptions classes, so we can get the exception details. It also prints these added exceptions messages by default as part of the new exceptions messages.