AngularJS service not invoking error callback on save() method

前端 未结 6 2168
伪装坚强ぢ
伪装坚强ぢ 2021-01-17 18:07

So I\'m using angularjs restful service $resource and I\'m calling $save function. However, the error callback I pass to it is not being called. The server is sending a 41

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-17 18:34

    Had the same problem and nothing here worked. Turned out I had an custom debug-interceptor that didn't explicitly return a $q.reject(response).

    Apparently every custom debug-interceptor completely overwrites the default behavior.

    See https://github.com/angular/angular.js/issues/2609#issuecomment-44452795 for where I found the answer.

提交回复
热议问题