Files
reflector/www/app/lib/errorUtils.ts
2023-11-22 12:26:40 +01:00

12 lines
295 B
TypeScript

function shouldShowError(error: Error | null | undefined) {
if (
error?.name == "ResponseError" &&
(error["response"].status == 404 || error["response"].status == 403)
)
return false;
if (error?.name == "FetchError") return false;
return true;
}
export { shouldShowError };