-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Possible unhandled rejection #15599
Comments
Hi, are you using ui-router? If you are, try updating - angular-ui/ui-router#3120 |
The error messages should be better in 1.6.2 (thanks to #15527), but it is a documented breaking change and you'll have to deal with it one way or another. (Note that it is even possible to silence these errors via In any case, we can't do much without a reproduction of the issue. I am going to close, since everything works as expected (afaict), but feel free to continue the discussion below. |
In your example, by returning a string from the error handler, the success handler of the then function will be called, which is not what I want. |
I don't know what example you are talking about, but this sounds like a general support question, so please use one of the appropriate support channels. |
The one you gave in codepen https://codepen.io/ExpertSystem/pen/BpKjaZ?editors=0012 |
Oh, I gave one 😃 So, if your The only way to silence the Possibly Unhandled Rejection without providing an error handler is via |
Is there a new status on this issue? I want to achieve the same behavior. Can i somehow set the errorOnUnhandledRejections flag for the one promise during |
Since upgrading from 1.5.x to 1.6.1 I'm getting 'Possible unhandled rejection' errors on $http requests, even though I have a global httpinterceptor which catches errors (showing a dialog with the error message).
I've read about the reason for this error, but it seems to do more harm than good.
And the stack trace does not give any clue to where the error occurs (all lines point to code in angular.js).
I would rather not have to add an error handling method to each .then portion, it's unnecessary bloat.
Maybe I'm not handling the errors in the correct way in my global http interceptor ( according to what 1.6.1 expects), but fact is that before 1.6 this was working without errors.
Maybe you could provide an example of how errors should be handled correctly with a global http interceptor?
The text was updated successfully, but these errors were encountered: