I'm using Angular HttpClient. The problem is that sometimes an error occurs and the client gets status 0 "Unknown Error" back. We've found that the problem only happens in Safari (iOS and Mac) and Internet Explorer 11 in our production environment.
As a workaround we've put a HttpInterceptor into the game, which makes 5 retries with 300 ms between each. This seems to fix the problem. But I would like to know the root cause.
I've read that others have the same problem, but here it seems like it's CORS related. But since the problem is resolved by retrying, it shouldn't be CORS. Right?
My HttpClient.get:
public getData(): Observable<Hentdata> {
return this.httpClient.get<Hentdata>('api/hent')
.pipe(catchError(err => this.handleError(err)));
}
Update #1: We've a F5 Big IP load balancer in front of our applications. I read that there could be some problems with keep-alive in that regards.
Any suggestions?