This is how I'm doing my requests (and it's working).
this.http
.get(url, options)
.pipe(retryWhen((errors) => this.retry(errors, { delay: retryDelay, take: retryTake })))
.toPromise()
.catch((ex) => {
this.exception(ex);
throw ex;
});
Now, I have a specific address that takes too long to respond and because of that I'm getting 504.
So I'm trying work with timeout but it seems nothing changes, like on Chrome it waits only for 1 minute max. Heres the code:
this.http
.get(`${this.host}/${action}${query}`, options)
.pipe(timeout(300000), (e) => {
console.log(e);
return of(null);
})
.pipe(retryWhen((errors) => this.retry(errors, { delay: retryDelay, take: retryTake })))
.toPromise()
.catch((ex) => {
this.exception(ex);
throw ex;
});
What could I be doing wrong?
Working with:
Angular 6.1.0