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

Database errors are not displayed helpfully #298

Closed
rhigman opened this issue Oct 15, 2021 · 0 comments
Closed

Database errors are not displayed helpfully #298

rhigman opened this issue Oct 15, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rhigman
Copy link
Member

rhigman commented Oct 15, 2021

When a user attempts to submit data which violates a database constraint, the error message displayed is missing the actual database error; it only contains the error "detail".

E.g. on attempting to create a contribution with contribution_ordinal 0:
image
image

The database produces two messages, an ERROR followed by a DETAIL. While not very layperson-friendly, the ERROR message at least gives a clue as to which field was invalid (i.e. contribution_ordinal); the DETAIL message does not.

The notification in the GUI seems to think it is displaying both, the ERROR portion under "With error:" and the DETAIL portion under "and content:". However, the "With error:" section is consistently left blank, in all notifications on all forms and for all types of error.

Logging indicates this may be a third-party (Yew) bug, as the notification is displaying the contents of a FetchError of type DeserializeError { error: String, content: String }, but the error portion is already empty when the FetchError reaches the app:
image

(We should ideally make the error notifications much more user-friendly in general, but being able to see both halves of the database message would be a start!)

@rhigman rhigman added the bug Something isn't working label Oct 15, 2021
@ja573 ja573 self-assigned this Sep 22, 2022
@ja573 ja573 closed this as completed Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants