Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
This commit is contained in:
co-authored by
orca-bug-scan-bot
parent
493f08bfa5
commit
5e8f796200
@@ -70,7 +70,16 @@ async function doLoadHosts(): Promise<HostProfile[]> {
|
||||
|
||||
let token = tokenCache.get(stored.data.id)
|
||||
if (!token) {
|
||||
const fetched = await SecureStore.getItemAsync(tokenKey(stored.data.id), KEYCHAIN_OPTIONS)
|
||||
let fetched: string | null
|
||||
try {
|
||||
fetched = await SecureStore.getItemAsync(tokenKey(stored.data.id), KEYCHAIN_OPTIONS)
|
||||
} catch {
|
||||
// Why: a transient Keychain failure for one entry (e.g.
|
||||
// errSecInteractionNotAllowed while the device is briefly locked,
|
||||
// or a single corrupt record) must not blank the entire host list.
|
||||
// Skip just this host — it'll reappear on the next load.
|
||||
continue
|
||||
}
|
||||
if (!fetched) {
|
||||
// Why: orphaned metadata with no matching keychain entry — most
|
||||
// likely a stale record from a development install. Skip it
|
||||
|
||||
Reference in New Issue
Block a user