I'm not able to get my custom 503 response when a request is timed out. I am using the $http service and the timeout config is a promise. This is my plunker.
Asked
Active
Viewed 53 times
1 Answers
1
When you add a promise to the $http object, if it resolves before the request is able to resolve, the response is ABORTED which literally has:
- Status of "0"
- No data
- No status text
There is no 503 response reported "from the server" (from your interceptor) because the request was canceled prior to resolution.
For more information, take a look at this answer.