JSONAPI format
Sep 3, 2018 · 1 min read
I got this error recently, working with Ember Data:
Assertion Failed: normalizeResponse must return a valid JSON API document: * One or more of the following keys must be present: “data”, “errors”, “meta”.This error happens because the JSON you are returning isn’t a JSONAPI format. Since by default, Ember Data comes with a JSONAPI serializer, we have follow the JSONAPI format, which needs to have at least one the three mentioned keys within your requested data.
{
“data”:
{
your-data
},
“errors”:
{
your-data
},
“meta”:
{
your-data
}
}This could be applicable to any frameworks you use. So beware and keep your eyes out while coding!

