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

Make better error message from validation errors #405

Open
wbobeirne opened this issue Mar 19, 2019 · 1 comment
Open

Make better error message from validation errors #405

wbobeirne opened this issue Mar 19, 2019 · 1 comment

Comments

@wbobeirne
Copy link
Collaborator

Right now validation 400 errors get sent back from the api as:

{ "message": "Something went wrong" }

However, the error actually has some rich data to it, e.g.

{'comment': ['Longer than maximum length 1000.']}

It would be nice to present an error that uses this message instead of a generic one.

@dternyak
Copy link
Collaborator

dternyak commented Jun 5, 2019

A few links that point to code related: https://github.com/ZcashFoundation/zcash-grant-system/blob/develop/backend/grant/app.py#L42-L80

In particular, we'll want to ensure that comments longer than 1000 characters have better error responses: https://github.com/ZcashFoundation/zcash-grant-system/blob/develop/backend/grant/proposal/views.py#L101-L104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants