mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
16 lines
703 B
TypeScript
16 lines
703 B
TypeScript
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'))
|
|
)
|
|
}
|