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;
|
return res;
|
||||||
} on MatrixException catch (err) {
|
} on MatrixException catch (err) {
|
||||||
if (err.session == null) {
|
if (err.session == null) {
|
||||||
rethrow;
|
error = err;
|
||||||
|
state = UiaRequestState.fail;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
session ??= err.session;
|
session ??= err.session;
|
||||||
final completed = err.completedAuthenticationFlows;
|
final completed = err.completedAuthenticationFlows;
|
||||||
|
|
@ -72,7 +74,9 @@ class UiaRequest<T> {
|
||||||
params = err.authenticationParams ?? <String, dynamic>{};
|
params = err.authenticationParams ?? <String, dynamic>{};
|
||||||
nextStages = getNextStages(flows, completed);
|
nextStages = getNextStages(flows, completed);
|
||||||
if (nextStages.isEmpty) {
|
if (nextStages.isEmpty) {
|
||||||
rethrow;
|
error = err;
|
||||||
|
state = UiaRequestState.fail;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue