From b641d2e1867563a1f468fbd4c28606ba17ed396e Mon Sep 17 00:00:00 2001 From: Livio Brunner Date: Thu, 14 Sep 2023 21:28:32 +0200 Subject: [PATCH] fix: fails if unexpected error type thrown resolves #2256 --- lib/utils/is-error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/is-error.ts b/lib/utils/is-error.ts index 471cdb213..8258c0f6d 100644 --- a/lib/utils/is-error.ts +++ b/lib/utils/is-error.ts @@ -10,5 +10,5 @@ export function isAxiosError(err: any): err is AxiosError { } export function isError(err: any): err is Error { - return !!err.message; + return !!err?.message; }