stablyai/orca · warning · JiraSummaryLookupError

disconnected

disconnected

Error message

jira_summary_lookup:disconnected

What it means

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.

Source

Thrown at src/main/jira/issues.ts:683

    }
  }
  return null
}

export async function getIssueSummary(
  key: string,
  siteId: string,
  signal?: AbortSignal
): Promise<JiraIssue | null> {
  let entries: JiraClientForSite[]
  try {
    entries = getClients(siteId)
  } catch (error) {
    throw new JiraSummaryLookupError('auth', error)
  }
  const entry = entries.find((candidate) => candidate.site.id === siteId)
  if (!entry) {
    throw new JiraSummaryLookupError('disconnected')
  }

  return withJiraDeadline(signal, ISSUE_SUMMARY_TIMEOUT_MS, async (requestSignal) => {
    await acquire(requestSignal)
    try {
      const params = new URLSearchParams({ fields: ISSUE_SUMMARY_FIELDS.join(',') })
      const issue = await settleJiraSummaryRead(
        jiraRequest<JiraRecord>(
          entry,
          `${apiBasePath(entry.site)}/issue/${encodeURIComponent(key)}?${params.toString()}`,
          { signal: requestSignal }
        ),
        requestSignal
      )
      return mapJiraIssue(entry.site, issue)
    } catch (error) {
      if (isAuthError(error)) {
        throw new JiraSummaryLookupError('auth', error)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Connect the Jira site before requesting summaries.
  2. Filter the UI's issue-link lookup to only connected siteIds.
  3. Catch code 'disconnected' and show a 'connect Jira' prompt rather than an error toast.

Example fix

// before
const issue = await getIssueSummary(key, siteId)
// after
if (!isJiraSiteConnected(siteId)) { await openJiraConnect(siteId); return null }
const issue = await getIssueSummary(key, siteId)
Defensive patterns

Strategy: validation

Validate before calling

if (getClients(siteId).every((c) => c.site.id !== siteId)) { await openJiraConnect(siteId); return null }

Type guard

function isJiraSiteConnected(siteId: string): boolean {
  return getClients(siteId).some((c) => c.site.id === siteId)
}

Try / catch

try { return await getIssueSummary(key, siteId, signal) }
catch (e) {
  if (getJiraSummaryLookupErrorCode(e) === 'disconnected') { await openJiraConnect(siteId); return null }
  throw e
}

Prevention

When it happens

Trigger: 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.

Common situations: Site disconnected from the accounts UI. Multiple sites configured and a summary requested for the non-active one. App started before site connection completed.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/6be5b08f70220f47. Report an issue: GitHub.