-
Notifications
You must be signed in to change notification settings - Fork 98
TF-4081 Fix mobile user was logged out again #4088
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
base: master
Are you sure you want to change the base?
Conversation
This PR has been deployed to https://linagora.github.io/tmail-flutter/4088. |
It could be great to display somehow an explanation of what happens to the user. |
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.
TOO LONG, DID NOT READ
1000+ LOC changeset is a lot, even more for a simple bugfic.
I see a lot of duplicated try catch.
This is IMO symptomatic. I would have expected either a generic behaviour of the HTTP library, or an abstraction lying in tmail-flutter or even better in jmap-dart to help us significantly reduce the boiler plate code.
IMO, this is not a simple bugfix.
Invalid argument(s) (onError): The error handler of Future.catchError must return a value of the future's type To fix this issue properly, we needed to update all related data sources. Since we are following
|
If you have any suggestions, please share them with us. |
Issue
#4081
Analysis and Solutions
Error handling
NoNetworkError
), display the message"No internet connection"
to the user.refreshToken
).refreshToken
throws an exception, display a message to the user in the format:"Message [CodeError1 - CodeError2]"
.refreshToken
succeeds but returns an empty token, automatically log in again using the current user's information.Demo
auto-refresh.webm
logout.webm