You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mostly an issue in https://github.com/pixelhandler/ember-fetchjax. Which decides that a 204 response should have it's own handler that returns an empty string. The regular success handler is not called, and the resolved promise shows no sign of a 204 response (an empty string as response is not a good way to check if this was a 204).
Which means there is no way to single out these requests and handle the updates/state on the just-updated-resource.
To fix this, I have sent in this PR on ember-fetchjax.
That PR will break EJR however. I have some EJR changes/patches coming up to (hopefully) completely fix relationship tracking which rely on that ember-fetchjax PR though.
@aars If I recall, I added the special "No Content" handler to accommodate behavior from JSONAPI::Resources gem in the Rails app I worked on while developing the library. Which should be based on this part of the spec:
Note: If a 204 response is received the client should consider the resource object sent in the request to be accepted by the server, as if the server had returned it back in a 201 response.
I guess I figured an empty String '', was better then an undefined or null response. But yeah sounds like we should revisit that.
http://jsonapi.org/format/#crud-updating-responses-204
204 no content is a valid response, but it does not trigger any update on the
Resource
that was updated (sincedeserialize
has nothing to do).The text was updated successfully, but these errors were encountered: