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

Using wrong content header should give more error information. #111

Closed
chriscalip opened this issue Sep 28, 2017 · 2 comments
Closed

Using wrong content header should give more error information. #111

chriscalip opened this issue Sep 28, 2017 · 2 comments
Milestone

Comments

@chriscalip
Copy link

Wrong content header attempt.
curl -H 'content-type: application/json' -v -X PATCH -d '{"title": "XXX"}' http://cc.demo/api/v1/posts/1 > test2.htm
Gives ambigious error message:
{"errors":[]}

@lindyhopchris
Copy link
Member

So the validation here is done by the neomerx/json-api package. I haven't previously been able to override the error message it gives for invalid content type, which is why it gives an empty errors message. The HTTP response header is at least correct.

A very recent change to neomerx/json-api means however that I can now override this error message, as I requested in this issue:
neomerx/json-api#185

So I now need to update this package to use that change in neomerx/json-api.

@lindyhopchris
Copy link
Member

Closing as fixed on the 1.0 develop branch.

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