Merge branch 'krille/fix-background-uia' into 'main'
fix: UIA request stucks forever on unexpected matrixExceptions See merge request famedly/company/frontend/famedlysdk!966
This commit is contained in:
commit
215de3b948
|
|
@ -64,7 +64,9 @@ class UiaRequest<T> {
|
|||
return res;
|
||||
} on MatrixException catch (err) {
|
||||
if (err.session == null) {
|
||||
rethrow;
|
||||
error = err;
|
||||
state = UiaRequestState.fail;
|
||||
return null;
|
||||
}
|
||||
session ??= err.session;
|
||||
final completed = err.completedAuthenticationFlows;
|
||||
|
|
@ -72,7 +74,9 @@ class UiaRequest<T> {
|
|||
params = err.authenticationParams ?? <String, dynamic>{};
|
||||
nextStages = getNextStages(flows, completed);
|
||||
if (nextStages.isEmpty) {
|
||||
rethrow;
|
||||
error = err;
|
||||
state = UiaRequestState.fail;
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue