Handle integration credential decrypt failures (#4683)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-06-10 13:08:09 -07:00
committed by GitHub
co-authored by Orca
parent 31f0f254eb
commit ceae167427
18 changed files with 854 additions and 46 deletions
@@ -0,0 +1,15 @@
export type IntegrationCredentialService = 'Linear' | 'Jira'
export function credentialDecryptionMessage(service: IntegrationCredentialService): string {
return `Could not decrypt saved ${service} credential. Approve Keychain access or reconnect ${service}.`
}
// Why: decrypt errors cross IPC/RPC boundaries where only the message
// survives serialization, so detection matches on the canonical message.
export function isIntegrationCredentialDecryptionError(error: unknown): boolean {
const message = error instanceof Error ? error.message : String(error)
return (
message.includes(credentialDecryptionMessage('Linear')) ||
message.includes(credentialDecryptionMessage('Jira'))
)
}
+3
View File
@@ -21,6 +21,9 @@ export type JiraConnectionStatus = {
sites?: JiraSite[]
activeSiteId?: string | null
selectedSiteId?: JiraSiteSelection | null
// Set when a stored token file exists but could not be decrypted, so the
// UI can explain reads failing while the connection still looks saved.
credentialError?: string
}
export type JiraProject = {
+3
View File
@@ -1161,6 +1161,9 @@ export type LinearConnectionStatus = {
workspaces?: LinearWorkspace[]
activeWorkspaceId?: string | null
selectedWorkspaceId?: LinearWorkspaceSelection | null
// Set when a stored token file exists but could not be decrypted, so the
// UI can explain reads failing while the connection still looks saved.
credentialError?: string
}
export type LinearIssue = {