mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-28 20:06:56 +03:00
nfc: improve error handling
This commit is contained in:
parent
0e134bffcc
commit
cab3c009c5
@ -112,11 +112,12 @@ Pane {
|
||||
} else {
|
||||
navigator.snackBar(qsTr("Re-tap your YubiKey"))
|
||||
}
|
||||
} else if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
} else {
|
||||
navigator.snackBarError(navigator.getErrorMessage(
|
||||
resp.error_id))
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
console.log("calculate failed:", resp.error_id)
|
||||
}
|
||||
@ -157,7 +158,11 @@ Pane {
|
||||
navigator.snackBarError(
|
||||
navigator.getErrorMessage(resp.error_id))
|
||||
console.log("delete failed:", resp.error_id)
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,9 @@ StyledExpansionPanel {
|
||||
} else {
|
||||
navigator.snackBarError(getErrorMessage(resp.error_id))
|
||||
console.log("change password failed:", resp.error_id)
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
clearPasswordFields()
|
||||
navigator.goToSettings()
|
||||
@ -65,6 +68,9 @@ StyledExpansionPanel {
|
||||
} else {
|
||||
navigator.snackBarError(getErrorMessage(resp.error_id))
|
||||
console.log("set password failed:", resp.error_id)
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
clearPasswordFields()
|
||||
navigator.goToSettings()
|
||||
@ -83,6 +89,9 @@ StyledExpansionPanel {
|
||||
} else {
|
||||
navigator.snackBarError(getErrorMessage(resp.error_id))
|
||||
console.log("remove password failed:", resp.error_id)
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
clearPasswordFields()
|
||||
navigator.goToSettings()
|
||||
|
@ -33,7 +33,11 @@ StyledExpansionPanel {
|
||||
resp.error_id))
|
||||
console.log("reset failed:",
|
||||
resp.error_id)
|
||||
if (resp.error_id === 'no_device_custom_reader') {
|
||||
yubiKey.clearCurrentDeviceAndEntries()
|
||||
}
|
||||
}
|
||||
|
||||
navigator.goToSettings()
|
||||
})
|
||||
}
|
||||
|
@ -333,6 +333,7 @@ Python {
|
||||
currentDeviceValidated = false
|
||||
navigator.goToEnterPasswordIfNotInSettings()
|
||||
} else if (resp.error_id === 'no_device_custom_reader') {
|
||||
navigator.snackBarError(navigator.getErrorMessage(resp.error_id))
|
||||
clearCurrentDeviceAndEntries()
|
||||
} else {
|
||||
clearCurrentDeviceAndEntries()
|
||||
|
Loading…
Reference in New Issue
Block a user