stablyai/orca · error · Error

response.error.message

Error message

response.error.message

What it means

The github.listWorkItems RPC returned an RpcFailure (response.ok === false) during a GitHub issue/PR search. The call sends { repo, limit: PER_REPO_FETCH_LIMIT, query } and expects { items: GitHubWorkItem[] } on success. A failure is a transport or provider-level rejection from the host's GitHub integration.

Source

Thrown at mobile/src/tasks/smart-source-search-requests.ts:37

// both types. So pass the raw trimmed query straight through (an explicit
// `is:pr`/`is:issue` the user typed is honored by the runtime); empty stays empty
// so the runtime lists recent issues + PRs.
export function scopeGitHubQuery(query: string): string {
  return query.trim()
}

export async function searchGitHubItems(
  client: RpcClient,
  repoId: string,
  query: string
): Promise<GitHubWorkItem[]> {
  const response = await client.sendRequest('github.listWorkItems', {
    repo: `id:${repoId}`,
    limit: PER_REPO_FETCH_LIMIT,
    query: scopeGitHubQuery(query)
  })
  if (!response.ok) {
    throw new Error(response.error.message)
  }
  const envelope = (response as RpcSuccess).result as { items: GitHubWorkItem[] }
  // Stamp repoId so the shared row builder + create flow can attribute each item
  // to the searched repo (the runtime omits it, like the desktop fetcher).
  return (envelope.items ?? []).map((item) => ({ ...item, repoId }))
}

export async function searchGitLabItems(
  client: RpcClient,
  repoId: string,
  query: string,
  state: MrStateFilter
): Promise<GitLabWorkItem[]> {
  const response = await client.sendRequest('gitlab.listWorkItems', {
    repo: `id:${repoId}`,
    state,
    page: 1,
    perPage: GITLAB_PER_PAGE,

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Catch and return [] (empty results) with a visible 'GitHub unavailable' indicator instead of crashing the search panel.
  2. If 'method_not_found', disable the GitHub tab for that repo.
  3. Inspect response.error.data for rate-limit reset timing and surface 'try again in N seconds'.
  4. Retry with exponential backoff for transient 'runtime_error' codes.

Example fix

// before
if (!response.ok) {
  throw new Error(response.error.message)
}

// after — degrade to empty + signal so the UI shows a provider-down banner
if (!response.ok) {
  if (response.error.code === 'method_not_found') return []
  throw response.error // let the caller decide empty-vs-error
}
Defensive patterns

Strategy: fallback

Validate before calling

if (client.getState() !== 'connected') {
  return [] // cannot search while disconnected
}

Type guard

function isRpcFailure(r: RpcResponse): r is RpcFailure {
  return !r.ok
}

Try / catch

try {
  const items = await searchGitHubItems(client, repoId, query)
} catch (e) {
  return [] // show 'GitHub unavailable' in the picker
}

Prevention

When it happens

Trigger: GitHub not configured for the repo; host's GitHub token expired; 'method_not_found' on older runtimes; the host's GitHub search hit a rate limit; transport broke mid-search.

Common situations: User types in the smart source picker for a repo without GitHub linked; host GitHub PAT revoked; mixed mobile/desktop versions; aggressive search queries hitting GitHub rate limits.

Related errors


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