question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

normalizeErrorResponse should do less

See original GitHub issue

Our original intention with normalizeErrorResponse was to provide a standard way of presenting error responses. To achieve this goal we detected different scenarios and coerced the errors into JSONAPI format. normalizeErrorResponse is now quite unpredictable, especially to new users.

To goal is to reduce the amount of work that normalizeErrorResponse does to allow users to opt-in to formatting their error response instead of doing it manually.

TODO

  • Add a deprecation warning to normalizeErrorResponse stating that current behavior of normalizeErrorResponse is deprecated and will be removed in Ember Ajax 3.0
  • Refactor Error Classes to ES6 and add errors getter that throws a deprecation warning that errors property will be removed in Ember Ajax 3.0
  • Copy the payload onto payload property of error instance

Related Issues

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jherdmancommented, Oct 13, 2016

Ah, yes! That worked like a charm. #til

0reactions
alexlafrosciacommented, Mar 27, 2017

Closed by #265

Read more comments on GitHub >

github_iconTop Results From Across the Web

Normalize Error - Teach Like a Champion!©
Normalize Error is a strategy that discusses appropriate responses to student answers. ... A teacher should make sure that all answers are accepted, ......
Read more >
Normalize Error - Champion teaching - WordPress.com
Learning is the act of making mistakes, then making less of them. ... Do not feel badly about saying an answer is incorrect...
Read more >
node.js - How to normalize error objects in a promise chain?
In order to report any error consistently to the callee, I would like to normalize all error objects to follow a common format....
Read more >
Why ember-ajax traverse the array response? #157 - GitHub
The goal for this code was to normalize error responses. We've realized that this is a bad idea and will be changing this...
Read more >
How to normalize the RMSE - Marine Data Science
If the predicted and true responses differ substantially - at least for some observations - the RMSE will be large. A value of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found