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

cleanup + reject with useful reasons #4836

Merged
merged 1 commit into from
Mar 3, 2017
Merged

cleanup + reject with useful reasons #4836

merged 1 commit into from
Mar 3, 2017

Conversation

stefanpenner
Copy link
Member

@stefanpenner stefanpenner commented Mar 3, 2017

  • es6 cleanup
  • promise cleanup
  • remove dangling promises / errors
  • throw useful error message when a payload does not include an expected record instead of undefined

* es6 cleanup
* promise cleanup
* remove dangling promises / errors
* throw useful error message when a payload does not include an expected record instead of `undefined`
@stefanpenner stefanpenner changed the title reject with useful reason, rather then undefined when a scheduled fet… cleanup + reject with useful reasons Mar 3, 2017
@stefanpenner
Copy link
Member Author

Test failure is just on one of the appveyor things, and is unrelated to ember-data.


if (pair) {
pair.resolver.reject(error);
pair.resolver.reject(error || new Error(`Expected: '${internalModel}' to be present in the adapter provided payload, but it was not found.`));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only change to ember-data, previously undefined was throw, now it is an error with a actionable message.

@bmac bmac merged commit 84cf862 into master Mar 3, 2017
@bmac bmac deleted the throw-useful-reason branch March 3, 2017 21:51
@bmac
Copy link
Member

bmac commented Mar 3, 2017

Thanks @stefanpenner.

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

Successfully merging this pull request may close these issues.

None yet

2 participants