Skip to content

chore(IT-Wallet): [SIW-3468] Add origin to serialize failure reason to enhance mixpanel tracking on unexpected failures#7684

Open
DavideOnano wants to merge 12 commits intomasterfrom
SIW-3468/fix-unexpected-serialization
Open

chore(IT-Wallet): [SIW-3468] Add origin to serialize failure reason to enhance mixpanel tracking on unexpected failures#7684
DavideOnano wants to merge 12 commits intomasterfrom
SIW-3468/fix-unexpected-serialization

Conversation

@DavideOnano
Copy link
Collaborator

@DavideOnano DavideOnano commented Dec 4, 2025

Short description

Add origin context to all “unexpected” IT Wallet analytics events so Mixpanel receives more actionable reasons instead of generic UNEXPECTED values.

List of changes proposed in this pull request

  • Enrich CIE card reading unexpected tracking with event-derived origins and keep structured failure details.
  • Add origin metadata to credential and eID issuance unexpected tracking, wrapping serialized reasons when needed.
  • Extend remote and proximity presentation unexpected tracking to include origin hints and preserve reason structure for Mixpanel.

How to test

Unexpected test cases are unpredictable; in the current state, I couldn't cover the tests for this scenario.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.08%. Comparing base (8c64d18) to head (fc07311).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...on/cie/components/ItwCieCardReadFailureContent.tsx 0.00% 3 Missing ⚠️
...twallet/identification/cie/hooks/useCieManager.tsx 0.00% 2 Missing ⚠️
...llet/issuance/hooks/useCredentialEventsTracking.ts 0.00% 1 Missing ⚠️
...es/itwallet/issuance/hooks/useEidEventsTracking.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7684      +/-   ##
==========================================
- Coverage   60.08%   60.08%   -0.01%     
==========================================
  Files        1929     1929              
  Lines       42136    42136              
  Branches     9761     9758       -3     
==========================================
- Hits        25319    25318       -1     
  Misses      16731    16731              
- Partials       86       87       +1     
Files with missing lines Coverage Δ
ts/features/itwallet/common/utils/itwStoreUtils.ts 83.87% <100.00%> (ø)
...n/proximity/hooks/useItwProximityEventsTracking.ts 80.00% <100.00%> (ø)
...ntation/remote/hooks/useItwRemoteEventsTracking.ts 89.28% <100.00%> (ø)
...llet/issuance/hooks/useCredentialEventsTracking.ts 4.34% <0.00%> (ø)
...es/itwallet/issuance/hooks/useEidEventsTracking.ts 5.00% <0.00%> (ø)
...twallet/identification/cie/hooks/useCieManager.tsx 1.78% <0.00%> (ø)
...on/cie/components/ItwCieCardReadFailureContent.tsx 2.63% <0.00%> (-0.04%) ⬇️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 231c19a...fc07311. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DavideOnano DavideOnano self-assigned this Dec 10, 2025
@gispada
Copy link
Collaborator

gispada commented Dec 17, 2025

I am not totally convinced of this new origin property that takes a few hardcoded values. Does it really help when dealing with serialization issues? I thought we had to improve [object Object] messages.

Was it asked explicitly by the analytics team?

@DavideOnano
Copy link
Collaborator Author

@gispada
We decided to add this new key together with @MonicaRungi-EY to at least get an idea of where the error originates.
Unclear values such as [object Object], empty string and similar are received by the client as response payload, and we haven’t found an effective way to handle them on our side so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants