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

"Could not fetch Infinity Model" masks other errors #96

Closed
digitalcora opened this issue Oct 12, 2015 · 8 comments
Closed

"Could not fetch Infinity Model" masks other errors #96

digitalcora opened this issue Oct 12, 2015 · 8 comments

Comments

@digitalcora
Copy link

At a couple places in the route mixin (here and here), there is a promise failure handler that catches all errors and throws a generic "Could not fetch Infinity Model" error. This makes it quite difficult to determine what the actual error was – in my case the server response was successful, and I had to do some "pause on all exceptions" debugging to find out that it was ember-data telling me an association wasn't set up correctly. Is there an advantage to doing things this way? Why not allow the real error to surface?

@hhff
Copy link
Collaborator

hhff commented Oct 13, 2015

thanks @Grantovich - yeah that's a good point. I think we should probably remove all error handling from server promises, and leave them only for validation type errors.

@mkorfmann @mike-north @kellyselden - thoughts / tips here?

@hhff
Copy link
Collaborator

hhff commented Oct 13, 2015

just chatted with @mkorfmann - we'd like to ensure we return the error from the promise callback, but instead of throwing, we'll log an Ember.warn. That way nothing will be swallowed - and the error will be clearly ember-infinity related

We're waiting for #88 to get into the codebase before doing new work on it - so we'll get to this hopefully soon - thankyou @Grantovich !

@digitalcora
Copy link
Author

Thanks for the prompt response 😺 I look forward to those changes.

@davidgoli
Copy link
Collaborator

@Grantovich FYI #88 has merged

@hhff
Copy link
Collaborator

hhff commented Nov 12, 2015

@Grantovich - feel like writing a PR for this? ❤️

@digitalcora
Copy link
Author

This was something I encountered on a free-time project that I work on very infrequently, so I'm not sure if I'll be able to get to it in the near future 😿 I'll update here if I find some time to work on it.

@hhff
Copy link
Collaborator

hhff commented Nov 12, 2015

kk - thanks anywhoo @Grantovich !

@davidgoli
Copy link
Collaborator

Fixed with #125

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