Closed vvmoppescapita closed 8 years ago
Just to be clear, the interceptor overrides the behaviour for everything in the project that includes the oauth plugin. This causes some unexpected behaviour, for example where I'm returning error 400 (bad request) from my webapi backend. Instead of angular passing on the error to my error handler (of my .then call) it comes back as a "successful" response, with the error details in the response as if it was the data I requested.
Hello, I just encountered this same issue. As vvmoppescapita said, just returning the response will mean the error callbacks never get executed because angular will treat all responses as successful.
Agreed, silly mistake. Merged and bower version bumped up so you should be able to get it through a package update.
Thanks both.
The correct way to close a response error handler is to reject the response, not simply return it, or anything using the plugin won't be able to use the error handler clause with their promises.