gund / ng-http-interceptor

Http Interceptor library for Angular
MIT License
104 stars 16 forks source link

Intercept responseError #150

Closed alperg closed 7 years ago

alperg commented 7 years ago

How can I intercept responseError?

gund commented 7 years ago

If that is inside the body of your response JSON then you can do:

this.httpInterceptor.response().addInterceptor(res =>
  res.do(r => console.log(r.json()['responseError'])));