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 Handling Refactor #2931

Closed
1 of 11 tasks
twokul opened this issue Mar 24, 2015 · 2 comments
Closed
1 of 11 tasks

Error Handling Refactor #2931

twokul opened this issue Mar 24, 2015 · 2 comments

Comments

@twokul
Copy link
Member

twokul commented Mar 24, 2015

Idea behind this refactor is to have a sane way to deal with different types of errors. Adapters will read the payload, create an appropriate error (ValidationError, AdapterError, TimeoutError) and pass it down to Serializers (or other consumers). It will also deprecate passing jqXHR object around.

  • remove InvalidError from adapter code
  • likely parseErrors method is needed on BaseAdapter to parse json and extract errors
  • likely extractErrors method is needed on serializers
  • make sure store rejects with errors (here and here)
  • make sure activeModelAdapter rejects with errors (here)
  • make sure restAdapter rejects with errors (here)
  • add different types of errors (reject with an error with details, yay types)
    • AdapterError
    • ValidationError
    • TimeoutError
  • adapter should reject with errors, not xhr object from jQuery
    • jqXHR should not be passed around
  • json:api error type sematics should be supported OOB (might be a part of this PR)
  • add fetch polyfill
  • Ember.Enumerable -> EmberArray (here)

Original #2840

@twokul
Copy link
Member Author

twokul commented Mar 24, 2015

cc @igorT @tchak @bmac

@tchak
Copy link
Member

tchak commented Jul 22, 2015

@twokul most stuff on this check list were implemented/merged. I think we can close this.

@twokul twokul closed this as completed Jul 22, 2015
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

2 participants