data
data copied to clipboard
fix: only apply extractErrors to JSONAPI serializers
Description
Currently, ember-data uses a mechanism to extract information from error object in case of "InvalidError" from the server (e.g. HTTP 422 error). This mechanism is uses error format compliant to JSONAPI spec but is unfortunately also applied to REST Serializers.
This pull-request moves the code from parent JSONSerializer to JSONAPISerializer in order to keep usage of free error objects (i.e. not compliant with JSONAPI format).
Notes for the release
Fix: extractErrors is now only applied to JSONAPI Serializers when backend returns an InvalidError