stablyai/orca · error · Error
${response.error.message}
Error message
${response.error.message} What it means
The worktree.resolvePrBase RPC returned an RpcFailure (response.ok === false), so the desktop runtime rejected the request at the transport/protocol layer. The error envelope is { code, message, data } per RpcFailure in transport/types.ts:31. This is distinct from a GitHub provider failure, which the runtime surfaces as a soft { error: string } inside a successful result (caught separately at line 42). Common codes seen in this codebase: 'method_not_found' (host predates the RPC), 'unauthorized' (pairing revoked), 'runtime_error' (host-side throw).
Source
Thrown at mobile/src/tasks/composer-source-base-resolve.ts:38
prNumber: number
headRefName?: string
baseRefName?: string
isCrossRepository?: boolean
}): Promise<GitHubPrStartPoint> {
const { client, repoId, prNumber, headRefName, baseRefName, isCrossRepository } = args
const response = await client.sendRequest(
'worktree.resolvePrBase',
{
repo: `id:${repoId}`,
prNumber,
...(headRefName ? { headRefName } : {}),
...(baseRefName ? { baseRefName } : {}),
...(isCrossRepository !== undefined ? { isCrossRepository } : {})
},
{ timeoutMs: 30_000 }
)
if (!response.ok) {
throw new Error(response.error.message)
}
const result = (response as RpcSuccess).result as GitHubPrStartPoint | { error: string }
if ('error' in result) {
throw new Error(result.error)
}
return result
}
// Resolves a GitLab MR's base via worktree.resolveMrBase.
export async function resolveComposerMrBase(args: {
client: RpcClient
repoId: string
mrIid: number
sourceBranch?: string
targetBranch?: string
isCrossRepository?: boolean
}): Promise<ComposerHostedBase> {
const { client, repoId, mrIid, sourceBranch, targetBranch, isCrossRepository } = argsView on GitHub (pinned to 1136503c6a)
Solutions
- Inspect response.error.code before throwing: if 'method_not_found', surface 'Update Orca on your computer' rather than a raw provider error.
- If response.error.code === 'unauthorized', trigger the re-pair flow (the rpc-client latches auth-failed after 3 retries).
- Retry the call once after client.getState() returns 'connected' for transient 'runtime_error' codes.
- Raise timeoutMs or pass budgetSpansConnect when the call runs right after a slow reconnect.
Example fix
// before
if (!response.ok) {
throw new Error(response.error.message)
}
// after
if (!response.ok) {
if (response.error.code === 'method_not_found') {
throw new ComposerBaseUnsupportedError('Resolve PR base needs a newer desktop version')
}
throw new Error(response.error.message)
} Defensive patterns
Strategy: try-catch
Validate before calling
// Check connection + capability before sending
if (client.getState() !== 'connected') {
throw new Error('Not connected — cannot resolve PR base')
}
// Optionally probe method support once and cache (like findRepoMatchingSlugForPaste caches method_not_found) Type guard
function isRpcFailure(r: RpcResponse): r is RpcFailure {
return !r.ok
}
function isSoftErrorResult(r: unknown): r is { error: string } {
return !!r && typeof r === 'object' && 'error' in r && typeof (r as any).error === 'string'
} Try / catch
try {
const base = await resolveComposerPrBase({ client, repoId, prNumber })
} catch (e) {
if (e.message.includes('method_not_found')) {
showUpgradePrompt()
} else if (e.message.includes('unauthorized')) {
startRePair()
} else {
showError(e.message)
}
} Prevention
- Cache method_not_found per host so you don't repeat an unsupported probe on every PR selection.
- Check client.getState() === 'connected' before interactive calls to fail fast with a clear message.
- Keep mobile and desktop versions in sync to avoid method_not_found on new RPCs.
When it happens
Trigger: Calling resolveComposerPrBase against a desktop runtime older than the worktree.resolvePrBase method; the paired host's GitHub integration is unauthenticated; the 30s timeoutMs budget lapses over a slow VPN; the WebSocket dropped mid-call and the replay was rejected.
Common situations: Mobile app upgraded ahead of the desktop app (method not yet shipped on host); pairing token revoked between connect and this call; host's GitHub PAT/OAuth token expired; relay or Tailscale route adding latency past the 30s ceiling.
Related errors
- response.error.message
- response.error.message
- Failed to save review notes
- Failed to create markdown note
- Unable to create untitled markdown note
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/7e8413aa69830f87.
Report an issue: GitHub.