Files
orca/src/shared/integration-credential-errors.ts
T
Brennan Benson f06399f5fc Keep refreshed Linear Tasks rows current (#34591)
* Keep Linear refresh results authoritative in Tasks

* Preserve scoped Linear edits through read settlement

* Complete Linear consumer entry and source teardown

* Fix scoped Linear read lifecycle and external refresh

* Complete Linear terminal reads and causal refresh dispatch

* Cover cached Linear read reconciliation under pending writes

* Fix cold Linear lookup invalidation

* Make Linear regression fixtures deterministic

* Align Linear test fixture naming with lint policy

* Consolidate Linear test imports

* Keep Linear saved publications coherent through React replay

* Preserve confirmed Linear accounts through unavailable checks

* fix(linear): retire recovered credential errors on acknowledgement

* fix(linear): keep runtime cache reset on account acknowledgement

* Fix Linear CI fixtures after final main integration

* Correct Linear mobile fixtures and scoped lint annotations

* Keep the mobile fixture assertion annotation on its expression

* Fix Linear static contracts and integration test boundaries

* Complete audited Linear static gates and preserve no-op selection

* Separate Linear selection decisions from observations and preserve create completion

* Name exported Linear fixture mock types with public annotations

* Preserve exact submitted drafts through create settlement

* Read draft retention mode from its committed snapshot

* Publish the current closing draft after queued form replay

* Type Linear create attempts from their form owner

* fix: supply complete task creation test fixtures

* fix: complete checked Linear creation metadata fixtures

* test: complete Linear dialog fixture composition

* test: use host-qualified workspace keys for board sync fixture
2026-10-30 12:51:35 -07:00

24 lines
1.0 KiB
TypeScript

export type IntegrationCredentialService = 'Linear' | 'Jira' | 'Bitbucket'
export function credentialDecryptionMessage(service: IntegrationCredentialService): string {
return `Could not decrypt saved ${service} credential. Approve Keychain access or reconnect ${service}.`
}
// IPC/RPC may preserve only error messages; detect the canonical decrypt-failure text.
export function isIntegrationCredentialDecryptionError(error: unknown): boolean {
const message = error instanceof Error ? error.message : String(error)
return (
message.includes(credentialDecryptionMessage('Linear')) ||
message.includes(credentialDecryptionMessage('Jira')) ||
message.includes(credentialDecryptionMessage('Bitbucket'))
)
}
export const LINEAR_AUTHENTICATION_ERROR = 'Linear authentication expired for this workspace.'
export function linearIssueReadFailureMessage(error: unknown): string {
return isIntegrationCredentialDecryptionError(error)
? credentialDecryptionMessage('Linear')
: 'Unable to load Linear issues. Try again.'
}