Skip to content

Commit

Permalink
[INJIMOB-842]: add Vc in the stacktrace of error event (#1378)
Browse files Browse the repository at this point in the history
* [INJIMOB-842]: add complete Vc in the stacktrace of error event occuring during credential verification

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

* [INJIMOB-842]: add complete Vc in the stacktrace only for debug build

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>

---------

Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>
  • Loading branch information
Alka1703 authored Apr 16, 2024
1 parent d3e2b53 commit bb7c682
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shared/vcjs/verifyCredential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ function handleResponse(
const vcIdentifier = getMosipIdentifier(
verifiableCredential.credentialSubject,
);
const stacktrace = __DEV__ ? verifiableCredential : {};
sendErrorEvent(
getErrorEventData(
TelemetryConstants.FlowType.vcVerification,
TelemetryConstants.ErrorId.vcVerificationFailed,
TelemetryConstants.ErrorMessage.vcVerificationFailed + vcIdentifier,
stacktrace,
),
);
isVerifiedFlag = true;
Expand Down

0 comments on commit bb7c682

Please sign in to comment.