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
{{ message }}
Repository navigation
Should we always need to response a document for addRecord? #943
If a POST request did include a Client-Generated ID and the requested resource has been created successfully, the server MUST return either a 201 Created status code and response document (as described above) or a 204 No Content status code with no response document.
I have APIs response 204. When I try to create my resources with addRecord, I got the following errors:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
at JSONAPIDocumentSerializer.deserialize
I checked through the codes of orbit.js, and I found the TransformRequestProcessors.addRecord() always needs a document in the response.
Activity
dgeb commentedon Apr 2, 2022
@towerhe you're correct that a 204 is a valid response. I'll mark this as a bug and address it soon.