data icon indicating copy to clipboard operation
data copied to clipboard

fix: only apply extractErrors to JSONAPI serializers

Open Eredrim opened this issue 8 months ago • 4 comments

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

Eredrim avatar Jun 06 '24 16:06 Eredrim