Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on model/base does not to work with ember-data #22

Open
onumossn opened this issue Oct 29, 2018 · 2 comments
Open

Error on model/base does not to work with ember-data #22

onumossn opened this issue Oct 29, 2018 · 2 comments

Comments

@onumossn
Copy link

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 setting source/pointer to nil. 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?

@leondmello
Copy link

@richmolj any comments about this one ?

@richmolj
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants