-
Notifications
You must be signed in to change notification settings - Fork 301
Missing "errors" field in error response #218
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
Comments
errors
in error response
@joeyespo thanks for the detailed bug report. Did you end up finding a fix and would you like to open a PR? If not I'll try to get to it myself. I'm guessing that the issue has something to do with calling |
Ok. Rebased and opening the PR now. Feel free to rename any variables or completely change it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The 400-level errors are responding with a JSON array containing error objects, but the JSON API spec requires a top-level
error
field.To reproduce
Use
serializer.is_valid(raise_exception=True)
in an API viewSend invalid JSON from the client to any API endpoint
Example:
Expected response:
Actual response:
It seems like the exception handler is properly setting the resource name, which should be used here. The former gets called, but the latter does not. DRF seems to have taken over, responding with this project's
exception_handler
as-is.My requirements
My config
The text was updated successfully, but these errors were encountered: