Add additional details in HTTP 500 error page message#9762
Conversation
ahukkanen
left a comment
There was a problem hiding this comment.
Overall this looks quite good but there are some problems regarding some formatting and also how we lay out the error information on the page and in the text copied to the clipboard.
The HTTP referer information is also incorrect as the "current" URL. And there was some missing information as defined in the original proposal.
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
ahukkanen
left a comment
There was a problem hiding this comment.
Looking good already!
I have just a couple more refinement requests but from functionality perspective it seems great now.
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/spec/services/decidim/log_reference_generator_spec.rb
Outdated
Show resolved
Hide resolved
decidim-core/spec/services/decidim/log_reference_generator_spec.rb
Outdated
Show resolved
Hide resolved
The followings have been changed: - Moved the plain information creatio from view to controller - Moved reference generation to the controller - Remove extra spacing generated by the textarea
The following changed: - Id of the copy link - Unused allows in spec files
ahukkanen
left a comment
There was a problem hiding this comment.
Looking good, just few more cleanups for generating the table.
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
ahukkanen
left a comment
There was a problem hiding this comment.
Sorry I missed this on the previous review but there is one more layout issue with this.
Please see below.
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/decidim/errors/internal_server_error.html.erb
Outdated
Show resolved
Hide resolved
* Add detail to the error page * Undo a mistakenly commented out file * Add additional details to the error page and log file * Complete logger feature with testing * Normalize en locale * Fix reviewers' comments * Fix linter error * Apply reviewers' comments The followings have been changed: - Moved the plain information creatio from view to controller - Moved reference generation to the controller - Remove extra spacing generated by the textarea * Fix remaining issues The following changed: - Id of the copy link - Unused allows in spec files * Revert unnecessary chamge of a file to the original state * Move info_hash to the controller * Dynamically generate the info table * Remove extra space in an erb file * Fix copy button in view * Remove unnecessary wrappers from the view * Empty-Commit
🎩 What? Why?
Currently when an unexpected situation (i.e. a bug) happens in Decidim, we don't get much details about the situation from the users. We generally have to filter the logs by utilizing the "about" time when the situation happened.
This pull requests add described details here.
After merging to the core, this pull request adds the following details to server error:
Also, users are able to copy all these information by clicking on "copy to clipboard" button, and paste it to their emails:
These information, including the reference can be utilized to track down the cause of error in the log file, should the user report it:

📌 Related Issues
Testing
Tests added to the core tests; No prerequisite is needed