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
Really liking the lib, but curious why the deserializer doesn't handle json api complicant error messages, and how we should approach error deserialization using this lib.
I am attempting to deserialize a json api error:
Error example:
But am getting a type error, because attributes cannot be found:
TypeError: Cannot read property 'attributes' of undefined
at extractAttributes (deserializer-utils.js:96)
at push../node_modules/jsonapi-serializer/lib/deserializer-utils.js.module.exports.perform (deserializer-utils.js:161)
at resource (deserializer.js:26)
at deserialize (deserializer.js:38)
at index.js:51
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
I am deserializing the following JSON and am getting the same error.
{"data": {"type": "SomeModelType","attributes": {"name": "Some Custom Option","value": "This is the Value"}}}
Error Message
Debug: handler, error
TypeError: Cannot read property 'attributes' of undefined
at extractAttributes (.../node_modules/jsonapi-serializer/lib/deserializer-utils.js:89:37)
at module.exports.perform (.../node_modules/jsonapi-serializer/lib/deserializer-utils.js:149:13)
at resource (.../node_modules/jsonapi-serializer/lib/deserializer.js:25:10)
Hey there,
Really liking the lib, but curious why the deserializer doesn't handle json api complicant error messages, and how we should approach error deserialization using this lib.
I am attempting to deserialize a json api error:
Error example:
But am getting a type error, because
attributes
cannot be found:Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: