From 47ea30004614eb3a54035a7e5d8c46e76cacc788 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Wed, 7 Feb 2024 16:03:39 +0530 Subject: [PATCH] Fixed: error handling in login process in case of object in error (dxp-258) --- src/store/modules/user/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index e73b740a..b10c32aa 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -66,7 +66,7 @@ const actions: ActionTree = { // TODO Check if handling of specific status codes is required. showToast(translate('Something went wrong while login. Please contact administrator.')); logger.error("error: ", err.toString()); - return Promise.reject(new Error(err)) + return Promise.reject(err instanceof Object ? err : new Error(err)); } },