This repository was archived by the owner on Apr 12, 2024. It is now read-only.
bug($resource): promise not resolved with value returned by responseErrorInterceptor
#14837
Milestone
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
Since 71cf28c (landed in master only), when there is either a
responseError
interceptor, the promise returned by a$resource
instance action (or exposed asinstance.$promise
) is always resolved with the original response, instead of being fulfilled (resolved or rejected) with the value returned by the interceptor.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
Demo (running with
1.5.7
- change versions tosnapshot
to see the issue)1.5.7
: The promise is rejected with the value returned by theresponseError
interceptor.snapshot
: The promise is resolved (instead of rejected) with the original response (instead of the value returned by theresponseError
interceptor).What is the expected behavior?
Behavior on
snapshot
(eventual 1.6.x) should be the same as on1.5.x
.What is the motivation / use case for changing the behavior?
Fix a regression.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Works on
1.5.x
. Broken onsnapshot
(eventual 1.6.x).The text was updated successfully, but these errors were encountered: