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

Catching errors from other things #66

Closed
zackify opened this issue May 4, 2015 · 12 comments
Closed

Catching errors from other things #66

zackify opened this issue May 4, 2015 · 12 comments

Comments

@zackify
Copy link

zackify commented May 4, 2015

The .catch from one ajax call is catching errors completely unrelated. One time I had required a file that did not exist, and it was being caught inside a module that I was making an ajax request in using axios. Promises seem to be messed up.

@Nicolab
Copy link

Nicolab commented May 28, 2015

Here also. Axios catch an Exception generated by a Chrome extension

@zackify
Copy link
Author

zackify commented May 28, 2015

Glad I'm not the only one, I don't get how more people aren't seeing this.

@Nicolab
Copy link

Nicolab commented May 28, 2015

May be because an exception is thrown into the then() method.
In my case in the then() method I have an events dispatcher and the Chrome extension explain the Flow.

@Nicolab
Copy link

Nicolab commented Jun 5, 2015

Hmm, Axios even catch exceptions thrown out of the method then().

@mzabriskie
Copy link
Member

This is definitely not expected behavior. For those experiencing this, can you please provide a gist, or some example how to reproduce? Thanks.

@mzabriskie mzabriskie added the bug label Jun 19, 2015
@csm123
Copy link

csm123 commented Jul 7, 2015

I'm using the same sort of promises as Axios on a project, and the promise catches exceptions in then. That is, exceptions in then don't throw an error in the Chrome console - instead the promise has the error. You can tack on .catch(function(err) { console.error(err); }); for debug purposes, but that's not really a lasting solution. Unsure of what to do here.

@csm123
Copy link

csm123 commented Jul 7, 2015

Related: stefanpenner/es6-promise#40

@csm123
Copy link

csm123 commented Jul 8, 2015

Also, this is how it's handled in es6-promise's parent library, RSVP.

https://github.com/tildeio/rsvp.js#error-handling

@dmt0
Copy link

dmt0 commented Mar 10, 2016

I'm getting this in one (but not all) of my projects. Any time I hit an undefined.member in the render() function of any React component, Axios catches it.

##199

@nickuraltsev
Copy link
Member

This issue is not actionable as is. Please provide a code snippet that reproduces the problem and reopen.

@dmt0
Copy link

dmt0 commented May 9, 2016

According to this it's actually the correct behavior apparently.

@gee1k
Copy link

gee1k commented May 27, 2017

I am also getting this error. Is there an explanation for this?

@axios axios locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants