From a59ccda9db3c13f731c1ac8c75377b2de11e1f8b Mon Sep 17 00:00:00 2001 From: Vaibhav Sethia Date: Fri, 8 Nov 2024 15:46:50 +0530 Subject: [PATCH 1/2] chore: add device session error msg --- packages/core/src/operations/proto/getResult.ts | 2 ++ packages/interfaces/src/errors/appError.ts | 6 ++++++ submodules/common | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/core/src/operations/proto/getResult.ts b/packages/core/src/operations/proto/getResult.ts index 437164eb8..96c9a39fc 100644 --- a/packages/core/src/operations/proto/getResult.ts +++ b/packages/core/src/operations/proto/getResult.ts @@ -52,6 +52,8 @@ export const getResult = async ({ [ErrorType.INVALID_MSG]: DeviceAppErrorType.INVALID_MSG, [ErrorType.APP_NOT_ACTIVE]: DeviceAppErrorType.APP_NOT_ACTIVE, [ErrorType.APP_TIMEOUT_OCCURRED]: DeviceAppErrorType.APP_TIMEOUT, + [ErrorType.DEVICE_SESSION_INVALID]: + DeviceAppErrorType.DEVICE_SESSION_INVALID, }; throw new DeviceAppError(errorMap[result.error.type]); diff --git a/packages/interfaces/src/errors/appError.ts b/packages/interfaces/src/errors/appError.ts index de97ce5ae..c16d457e6 100644 --- a/packages/interfaces/src/errors/appError.ts +++ b/packages/interfaces/src/errors/appError.ts @@ -31,6 +31,8 @@ export enum DeviceAppErrorType { DEVICE_AUTH_FAILED = 'APP_0700', CARD_AUTH_FAILED = 'APP_0701', + + DEVICE_SESSION_INVALID = 'APP_0800', } type CodeToErrorMap = { @@ -113,6 +115,10 @@ export const deviceAppErrorTypeDetails: CodeToErrorMap = { subError: {}, message: 'Card seems to be compromised. Contact Cypherock support', }, + [DeviceAppErrorType.DEVICE_SESSION_INVALID]: { + subError: {}, + message: 'Session establishment Failed. Invalid Session!', + }, }; export class DeviceAppError extends DeviceError { diff --git a/submodules/common b/submodules/common index 312f77bf0..d25da96a2 160000 --- a/submodules/common +++ b/submodules/common @@ -1 +1 @@ -Subproject commit 312f77bf0f5a842efb04c7c131bfc522b983441a +Subproject commit d25da96a280e126a58298f1929322cf59d5dc5cf From dedf86fbfde33e2cd232f179a70a982614381d83 Mon Sep 17 00:00:00 2001 From: Vaibhav Sethia Date: Sat, 9 Nov 2024 17:12:11 +0530 Subject: [PATCH 2/2] chore: update submodule --- submodules/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/common b/submodules/common index d25da96a2..fad3986b0 160000 --- a/submodules/common +++ b/submodules/common @@ -1 +1 @@ -Subproject commit d25da96a280e126a58298f1929322cf59d5dc5cf +Subproject commit fad3986b0b2e0765acba54c25111c3b4747c5aaa