Skip to content

Add additional details in HTTP 500 error page message#9762

Merged
ahukkanen merged 16 commits intodecidim:developfrom
mainio:feature/add-additional-details-in-HTTP500-error-page-message
Sep 2, 2022
Merged

Add additional details in HTTP 500 error page message#9762
ahukkanen merged 16 commits intodecidim:developfrom
mainio:feature/add-additional-details-in-HTTP500-error-page-message

Conversation

@sinaeftekhar
Copy link
Copy Markdown
Contributor

@sinaeftekhar sinaeftekhar commented Aug 24, 2022

🎩 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:

  • Id of the user
  • Date and time
  • The URL where the error took place
  • Request method
  • And a unique id, of which copy is being added to the log-file, and should the user informs the maintenance/administrators, it helps finding the log relating to that error.
    Also, users are able to copy all these information by clicking on "copy to clipboard" button, and paste it to their emails:
    image

These information, including the reference can be utilized to track down the cause of error in the log file, should the user report it:
image

📌 Related Issues

Testing

Tests added to the core tests; No prerequisite is needed

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ahukkanen ahukkanen changed the title Add additional details in http500 error page message Add additional details in HTTP 500 error page message Aug 25, 2022
@sinaeftekhar sinaeftekhar requested a review from ahukkanen August 31, 2022 07:05
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good already!

I have just a couple more refinement requests but from functionality perspective it seems great now.

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
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just few more cleanups for generating the table.

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this on the previous review but there is one more layout issue with this.

Please see below.

@ahukkanen ahukkanen merged commit 5da008a into decidim:develop Sep 2, 2022
@ahukkanen ahukkanen deleted the feature/add-additional-details-in-HTTP500-error-page-message branch September 2, 2022 17:05
entantoencuanto added a commit that referenced this pull request Sep 9, 2022
* develop:
  Add additional details in HTTP 500 error page message (#9762)
  Publication date field for blog articles (#9757)
  Import budgeting projects into accountability results (#9604)
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
  Add additional details in HTTP 500 error page message (#9762)
  Publication date field for blog articles (#9757)
  Import budgeting projects into accountability results (#9604)
  Redesign: flash messages (#9774)
entantoencuanto added a commit that referenced this pull request Sep 12, 2022
* develop:
  Fix doorkeeper initialization after 5.6.0 release (#9785)
  Add additional details in HTTP 500 error page message (#9762)
  Publication date field for blog articles (#9757)
  Import budgeting projects into accountability results (#9604)
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants