holidayextras / jsonapi-client

Easily consume a json:api service in Javascript.
MIT License
68 stars 19 forks source link

Fix error EUNKNOWN on 204 response #53

Open abemedia opened 7 years ago

abemedia commented 7 years ago

All empty responses return a 500 EUNKNOWN error, the jsonapi spec however states that 204 responses are a valid response for POST, PATCH & DELETE requests where the result matches the request body. Here an excerpt from the spec:

A server MUST return a 204 No Content status code if an update is successful and the representation of the resource in the request matches the result.

abemedia commented 7 years ago

Just checked the logs on travis and the fail was not a fault of the code!

pmcnr-hx commented 7 years ago

@abeMedia: I've rerun the build. I'll try to review the PR soon.