Skip to content
Snippets Groups Projects
Commit f336f4ec authored by Markin Igor's avatar Markin Igor
Browse files

Parse error details for Android.

parent 454c4d5d
Branches 6-set-up-building-process
No related tags found
1 merge request!2Resolve "Rework auth flow."
......@@ -114,11 +114,17 @@ class _MainAppState extends State<MainApp> {
log("Err $error");
String errorMessage = error.message;
String errorDetails = error.details;
String errorDetails = "";
try {
errorDetails = json.decode(error.details)["errorDescription"];
} catch (e) {
errorDetails = error.details;
}
if (
// Handle cancellation for Android
errorDetails == '{"type":0,"code":1,"errorDescription":"User cancelled flow"}' ||
errorDetails == 'User cancelled flow' ||
// Handle cancellation for iOS
errorMessage.toLowerCase().contains("the operation couldn")
) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment