Ionic HTTP Request Timeout

It still gets to the subscribe method, a timeout is an error so it should get to the error part:

this.http.get(url)
  .timeout(1000)
  .map(...)
  .subcribe((success) => {...}, (err) => { // Deal here with timeout error. });

Don’t take my word for granted, check the docs, i may be wrong if it goes in the success or the error function.

8 Likes