I am currently working in a fork of this example project
It implements a global error handler and an HTTP interceptor. That's fine, but I would like to know if it is possible to have more control on how to handle my errors on a per case basis:
- if an HTTP call handles its own errors, do not use HTTP interceptor
- Use HTTP interceptors for all other cases
- also, be able to decide when I want to make an HTTP call providing my own handler and when not to.
Ideally, I would like to have something like
//most cases (global error handling)
myHttpService.post("api url", payload).subscribe(....)
//custom handler
myHttpService.post("api url", payload).subscribe(..., (err) =>{})
//custom handler could also be
myHttpService.post("api url", payload).subscribe(...).catchError(...)
//or also
myHttpService.post("api url", payload, errHandlerFunction).subscribe(...)
is it possible to have both global error handler, interceptor AND per-call handling?