-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(IT Wallet): [SIW-2022] Increased serialization for unexpected errors during eID issuance #6770
base: master
Are you sure you want to change the base?
Conversation
PR Title Validation for conventional commit type✅ All good! PR title follows the conventional commit type. |
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6770 +/- ##
==========================================
+ Coverage 41.94% 50.98% +9.04%
==========================================
Files 1429 1579 +150
Lines 29960 32715 +2755
Branches 6662 7369 +707
==========================================
+ Hits 12566 16679 +4113
+ Misses 17364 15991 -1373
- Partials 30 45 +15
... and 479 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Short description
This PR aims to enhance the reason, in the Mixpanel tracking, for errors during eID issuance that fall under
IssuanceFailureType.UNEXPECTED
.Some unexpected errors in the reason field on Mixpanel report as
{"jsEngine":"hermes"}
. Unfortunately, this error is not descriptive, making it difficult to understand what the actual issue was.List of changes proposed in this pull request
trackItwIdRequestUnexpectedFailure
function to verify iffailure.reason
isempty
If
failure.reason
isempty
, theserializeFailureReason
function (already used in theuseItwFailureSupportModal
hook) is utilized; otherwise, the current behavior is maintained.How to test
Testing with Non-Empty Object
io-react-native-wallet
package locally, you can simulate an unexpected error by throwingthrow new AuthorizationIdpError("access_denied", "ErrorCode nr21: Timeout during user authentication");
{"code":"ERR_IO_WALLET_IDENTIFICATION_RESPONSE_PARSING_FAILED","error":"access_denied","errorDescription":"ErrorCode nr21: Timeout durante l'autenticazione utente","jsEngine":"hermes","name":"AuthorizationIdpError"}
Testing Serialization Enhancement
Network request failed
. In detail, the error appears as{"reason": [TypeError: Network request failed], "type": "UNEXPECTED"}
. Previously, this error was reported on Mixpanel with the reason as{"jsEngine":"hermes"}
.{“jsEngine”: “hermes”}
as reason, probably has an empty object asfailure.reason
, butfailure.reason.message
is populated. With the recent changes, the reason on Mixpanel should now correctly show the reason