{"record":{"id":"6be5b08f70220f47","repo":"stablyai/orca","slug":"disconnected","errorCode":"disconnected","errorMessage":"jira_summary_lookup:disconnected","messagePattern":"jira_summary_lookup:disconnected","errorType":"error_code","errorClass":"JiraSummaryLookupError","httpStatus":null,"severity":"warning","filePath":"src/main/jira/issues.ts","lineNumber":683,"sourceCode":"    }\n  }\n  return null\n}\n\nexport async function getIssueSummary(\n  key: string,\n  siteId: string,\n  signal?: AbortSignal\n): Promise<JiraIssue | null> {\n  let entries: JiraClientForSite[]\n  try {\n    entries = getClients(siteId)\n  } catch (error) {\n    throw new JiraSummaryLookupError('auth', error)\n  }\n  const entry = entries.find((candidate) => candidate.site.id === siteId)\n  if (!entry) {\n    throw new JiraSummaryLookupError('disconnected')\n  }\n\n  return withJiraDeadline(signal, ISSUE_SUMMARY_TIMEOUT_MS, async (requestSignal) => {\n    await acquire(requestSignal)\n    try {\n      const params = new URLSearchParams({ fields: ISSUE_SUMMARY_FIELDS.join(',') })\n      const issue = await settleJiraSummaryRead(\n        jiraRequest<JiraRecord>(\n          entry,\n          `${apiBasePath(entry.site)}/issue/${encodeURIComponent(key)}?${params.toString()}`,\n          { signal: requestSignal }\n        ),\n        requestSignal\n      )\n      return mapJiraIssue(entry.site, issue)\n    } catch (error) {\n      if (isAuthError(error)) {\n        throw new JiraSummaryLookupError('auth', error)","sourceCodeStart":665,"sourceCodeEnd":701,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/jira/issues.ts#L665-L701","documentation":"Thrown by getIssueSummary when getClients(siteId) returns a list but none of the entries has site.id === siteId. This means the site is not currently connected (no live client) and is encoded as JiraSummaryLookupError code 'disconnected'. It is distinct from 'auth' (which is a credential failure) — here there is simply no client for that site.","triggerScenarios":"Requesting a summary for a siteId that exists in config but is not in the active/connected set, e.g. after the user disconnected the site, or before completing OAuth on a newly added site.","commonSituations":"Site disconnected from the accounts UI. Multiple sites configured and a summary requested for the non-active one. App started before site connection completed.","solutions":["Connect the Jira site before requesting summaries.","Filter the UI's issue-link lookup to only connected siteIds.","Catch code 'disconnected' and show a 'connect Jira' prompt rather than an error toast."],"exampleFix":"// before\nconst issue = await getIssueSummary(key, siteId)\n// after\nif (!isJiraSiteConnected(siteId)) { await openJiraConnect(siteId); return null }\nconst issue = await getIssueSummary(key, siteId)","handlingStrategy":"validation","validationCode":"if (getClients(siteId).every((c) => c.site.id !== siteId)) { await openJiraConnect(siteId); return null }","typeGuard":"function isJiraSiteConnected(siteId: string): boolean {\n  return getClients(siteId).some((c) => c.site.id === siteId)\n}","tryCatchPattern":"try { return await getIssueSummary(key, siteId, signal) }\ncatch (e) {\n  if (getJiraSummaryLookupErrorCode(e) === 'disconnected') { await openJiraConnect(siteId); return null }\n  throw e\n}","preventionTips":["Restrict summary lookups to connected siteIds.","Show a 'Connect Jira' affordance instead of an error for disconnected sites.","Refresh the connected-site set before batch lookups."],"tags":["jira","disconnected","summary-lookup","connection"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}