Open onumossn opened 6 years ago
@richmolj any comments about this one ?
I'm up for rendering a source/pointer
in this case specifically to support ember-data; I'd merge a PR.
That said, seems more like ember-data issue than anything else. It seems ember-data doesn't support the concept of validation errors that are not on an attribute - if we did data/attributes/base
, we're saying "there is an attribute called base that has an error", which is not actually the case.
So I'd merge a fix to accommodate real-life, but note that fix would be an annoying hack.
Since ember-data seems to expect
source/pointer
to be"data/attributes/base"
for errors on the model which aren't specific to a model attribute (https://github.com/emberjs/data/blob/v3.5.0/addon/-private/adapters/errors.js#L446) and https://github.com/jsonapi-suite/jsonapi_errorable/pull/13/files#diff-464e7d878a98e6a985d3f83118db6c98R97 started settingsource/pointer
tonil
. The error on returned from the api can no longer be found on the ember-data model. Why was this change made? Can it be undone or made an option?