-
Notifications
You must be signed in to change notification settings - Fork 228
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
Error response body's content type is "text/plain;charset=UTF-8" #2789
Comments
This might be related to #2784 Can you reproduce with 6.1.8? I've tried patching an invalid field, fetching and invalid collection, creating something I don't have permission to. All the errors return the correct content type with 6.1.8:
|
I just tried with version 6.1.8 and it's the same result, but yes - seems like it only for PATCH error response bodies. One example is patching a random object's attribute:
Response body' content-type was |
My bad. This is the same issue as #2784. The fix for that hasn't been released yet. It will be in 6.1.9. |
Ok, then we'll have to wait for it, thanks! |
Hi @aklish, I've found another issue - the |
@aklish could you also fix it in version 6.x.x? |
Expected Behavior
Error response body's content-type is application/vnd.api+json, like for all other responses.
Current Behavior
Any kind of error (exception, for example) returns a response body with content type text/plain;charset=UTF-8.
Steps to Reproduce (for bugs)
Trigger an error response - e.g. update an existing entity, but provide an unknown field name, or throw a custom exception that extends Elide's
CustomErrorException
.Context
In addition to receiving the wrong content-type in response body, rest assured unit tests are also failing if we're trying to validate the body:
Your Environment
The text was updated successfully, but these errors were encountered: