-
Notifications
You must be signed in to change notification settings - Fork 535
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
:unprocessable_entity
deprecated in newest Rack, and causing a 0
response
#1456
Comments
@pareeohnos Just one minor note--your description says ":unprocessable_entity in favour of :unprocessible_entity" the second time around. |
@pareeohnos I fixed this issue in my application by just adding the key back into the Rack utils for now:
While I might expect the JR maintainers to fix this for current versions, I'm still running |
Whoops, good catch I've fixed.
Ah yeah that's a nice simple fix. The PR I've opened should be backwards compatible so if it gets merged and you are able to upgrade it shouldn't break anything but that's definitely the way to go until it's merged |
Fixes #1456 Co-authored-by: Adrian Hooper <adrian.hooper@builder.ai>
Fixes #1456 Co-authored-by: Adrian Hooper <adrian.hooper@builder.ai>
This issue is a (choose one):
Checklist before submitting:
Description
A change introduced to Rack deprecates the status
: unprocessable_entity
in favour of:unprocessable_content
. They have handled this deprecation internally, howeverjsonapi-resources
retrieves the status code by directly accessing theRack::Utils::SYMBOL_TO_STATUS_CODE
hash. Due to the deprecation, no status is found which results injsonapi-resources
returning a0
status when there are validation errors.Short term this can be fixed by using the Rack methods for status retrieval rather than accessing the hash directly. Longer term,
jsonapi-resources
will need to stop using:unprocessable_entity
in favour of: unprocessable_entity
but it would have to be done in a way that checks the version of Rack.Reproducible code:
The text was updated successfully, but these errors were encountered: