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

catch json parse errors and return error message instead #20

Open
Dobatymo opened this issue Oct 15, 2020 · 0 comments
Open

catch json parse errors and return error message instead #20

Dobatymo opened this issue Oct 15, 2020 · 0 comments

Comments

@Dobatymo
Copy link

Dobatymo commented Oct 15, 2020

If a client sends invalid json data, validate_json doesn't catch InvalidUsage("Failed when parsing body as json") raised by sanic. It should do so and return an error message and 400 status code.

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

Successfully merging a pull request may close this issue.

1 participant