i have implemented a global error tracking function in my angular application., there i gets this error occasionally ( whenever a user faces an error that error report will send to my db ) but most of the time my users facing below error ( atleast 10-20 times per day )
{"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":"https://www.test.in/v1/messages/","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://www.test.in/v1/messages/: 0 Unknown Error","error":{"isTrusted":true}}
both my frontend and backend has deployed in same server
firstly i assumed that it is due to network issue?but if it is due to network issue my error tracking api also must face same problem, but it didn't happen.
how to figure out cause of this issue?
my code
this._messageService.getMessage(body).subscribe(
(res: any) => {},
(err: any) => {
this._commonService.saveErrors({
error: err,
screen: this.pageName,
funcName: "load-messages",
});
}
);