-
Notifications
You must be signed in to change notification settings - Fork 3
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
Report error to sentry if initialization of userCodeModel fails #1651
Conversation
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.
Nice refactoring, tested on android and ios!
ee9cde4
to
c1ff216
Compare
I noticed that the initialization is not awaited in the DeepLink activation workflow. So I did this now. I then noticed that the deeplink activation workflow lacks user feedback. I added a loading spinner and some barebones error feedback. The error handling should be improved in the future. |
c1ff216
to
476d13d
Compare
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.
Thx for the fix! Works fine on android and ios
Could you please create an issue for the error handling improvement and add the particular issue id to the todo. thx
Also, if initialization fails, do not implicitly use empty array of user codes, but show error. Also throw Errors when using UserCodeModel when it is not properly initialized. Also add a loading spinner and some error popup to deeplink activation.
476d13d
to
0124851
Compare
Done! #1656 |
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.
Thanks for this PR, only one small suggestion. Not tested
Short description
Report errors to sentry if initialization of UserCodeModel fails, instead of silently swallowing potentially thrown exceptions.
Also, if initialization fails, do not implicitly use empty array of user codes, but show error.
Also throw Errors when using UserCodeModel when it is not properly initialized.
Side effects
If the initialization actually failed, the "Ausweisen" tab displays an error message now.
Testing
Activating card via Scanner and via Deeplink still works.
Activated cards survive app restart.
Resolved issues
Fixes: #1297
Related: #1265