0

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.

Eduardo
  • 63
  • 1
  • 8

1 Answers1

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.

Community
  • 1
  • 1
Beez
  • 2,081
  • 1
  • 20
  • 23