Skip to content
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

Customize error message based on error type #2028

Closed
maxpatiiuk opened this issue Aug 24, 2022 · 5 comments
Closed

Customize error message based on error type #2028

maxpatiiuk opened this issue Aug 24, 2022 · 5 comments
Labels
1 - Request Improvements or extensions to existing behavior
Milestone

Comments

@maxpatiiuk
Copy link
Member

The Invalid response code 504. Expected 200. Response: ... error message is not very helpful to a non-technical user.

It would be helpful to display a brief description of a problem and possible solutions (in this case, 504, Gateway Time-out, occurs because server is overloaded, and did not respond to a front-end requests within 60 seconds)

@maxpatiiuk maxpatiiuk added the 1 - Request Improvements or extensions to existing behavior label Aug 24, 2022
@maxpatiiuk maxpatiiuk changed the title Custom error message based on error type Customize error message based on error type Aug 24, 2022
@maxpatiiuk
Copy link
Member Author

@grantfitzsimmons says that 500 error is very common and that more should be done to explain the potential causes in the error message

@grantfitzsimmons
Copy link
Member

Any Error: Value is not defined needs to do better. It is possibly the least helpful thing for a user possible

@maxpatiiuk
Copy link
Member Author

maxpatiiuk commented Sep 14, 2022

The Value is not defined error message should never happen again (fixed in 6b0b102)

The unexpected response code error would now have a message explaining the likely cause and possible solutions.

Screen Shot 2022-09-14 at 10 15 07

For testing purposes, you can open the /specify/command/test-error page in Specify to trigger an error

maxpatiiuk added a commit that referenced this issue Sep 14, 2022
@maxpatiiuk maxpatiiuk added this to the 7.8.0 milestone Sep 14, 2022
@maxpatiiuk
Copy link
Member Author

@grantfitzsimmons here is the file that defines the error message for each Http response code - https://github.com/specify/specify7/blob/4b93058a678ea80d9c31ba8baac2f30be33cb574/specifyweb/frontend/js_src/lib/utils/ajax/definitions.ts

Feel free to edit that file to provide more details or improve the error messages

@grantfitzsimmons
Copy link
Member

#2237

Created a new issue to expand this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request Improvements or extensions to existing behavior
Projects
Archived in project
Development

No branches or pull requests

2 participants