QRCode login: treat not found error as expired error. (#6161)

Reorder some when cases.
This commit is contained in:
Benoit Marty 2026-02-09 16:34:23 +01:00 committed by GitHub
commit 20406ec0cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 4 deletions

View file

@ -119,7 +119,8 @@ class QrCodeLoginFlowNode(
is QrLoginException.Cancelled -> {
backstack.replace(NavTarget.Error(QrCodeErrorScreenType.Cancelled))
}
is QrLoginException.Expired -> {
is QrLoginException.Expired,
is QrLoginException.NotFound -> {
backstack.replace(NavTarget.Error(QrCodeErrorScreenType.Expired))
}
is QrLoginException.Declined -> {
@ -138,7 +139,9 @@ class QrCodeLoginFlowNode(
Timber.e(error, "OIDC metadata is invalid")
backstack.replace(NavTarget.Error(QrCodeErrorScreenType.UnknownError))
}
else -> {
QrLoginException.CheckCodeAlreadySent,
QrLoginException.CheckCodeCannotBeSent,
QrLoginException.Unknown -> {
Timber.e(error, "Unknown error found")
backstack.replace(NavTarget.Error(QrCodeErrorScreenType.UnknownError))
}