The documentation mentions you may define 4 functions for an interceptor and it says:
There are two kinds of interceptors (and two kinds of rejection interceptors):
request: interceptors get called with a http config object. The function is free to modify the config object or create a new one. The function needs to return the config object directly, or a promise containing the config or a new config object.
requestError: interceptor gets called when a previous interceptor threw an error or resolved with a rejection.
response: interceptors get called with http response object. The function is free to modify the response object or create a new one. The function needs to return the response object directly, or as a promise containing the response or a new response object.
responseError: interceptor gets called when a previous interceptor threw an error or resolved with a rejection.
I only have one interceptor defined. And I noticed that if the response HTTP code is 403, then the responseError function gets invoked. I'm not sure what else might trigger it. Where in the documentation does it say something about when do these 4 functions get invoked? Please cite any reputable sources.
It says:
"... when a previous interceptor threw an error or resolved with a rejection"
When does it throw an error or how does it resolve with a rejection? I need more elaboration on this part.