RED-4840: Fixed error message parsing.

This commit is contained in:
Nicoleta Panaghiu 2022-08-01 13:50:16 +03:00
parent ee7bba3d72
commit f7c0f48d45

View File

@ -15,6 +15,6 @@ export class ErrorMessageService {
}
private _parseErrorResponse(err: HttpErrorResponse): string {
return (err?.error?.message?.match('"message":"(.*?)\\"')?.[0] as string) || (err?.error?.message as string);
return (err?.error?.message?.match('"message":"(.*?)\\"')?.[0].replace(/"message":"|"/gm, '') as string) || (err?.error?.message as string);
}
}