I'm getting below error in 10 % of my requests on production env.
"error": "[ProgressEvent]",
"headers": "[ti]",
"message": "Http failure response for https://api.xxxxxx:5000/api/public-web/files: 0 Unknown Error",
"name": "HttpErrorResponse",
"ok": false,
"status": 0,
"statusText": "Unknown Error",
"url": "https://api.xxxxxx:5000/api/public-web/files"
Logs are from Sentry.
Stack:
- Angular 15 - Universal
- .Net Core 6
- Server: IIS 10
Firstly, I was thinking an issue is related to the CORS but although that I had already configured CORS on backend side, I've also added following to all response headers on the server in web-config (IIS)
:
access-control-allow-headers: *
access-control-allow-methods: GET,POST,PATCH,PUT,DELETE,OPTIONS
access-control-allow-origin: *
I've covered CORS just on the IIS with above custom headers in web.config, not on the application side.
Also I've read that it might be related to the bad internet connection (as per Angular official documentation) but that is not an issue here (maybe but just in 1% of 10% of cases).
Users have tried to change their network connection from WIFI to mobile but still the same issue appears.