From 91c2ca7a7c8784a10f13484a23e74008c7500bc2 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Wed, 7 Feb 2024 15:24:04 +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 979cd8c7..55aa8068 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -111,7 +111,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)); } },