{"record":{"id":"b7ead991d07d2e50","repo":"stablyai/orca","slug":"claude-sign-in-was-cancelled","errorCode":null,"errorMessage":"Claude sign-in was cancelled.","messagePattern":"Claude sign-in was cancelled\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"src/main/claude-accounts/service.ts","lineNumber":595,"sourceCode":"      wslLinuxAuthPath: null\n    }\n  ): Promise<CapturedClaudeAuth> {\n    const tempConfig = this.createTemporaryClaudeConfigDir(location)\n    const loginAbortController = new AbortController()\n    this.cancelPendingClaudeLogin = () => {\n      if (loginAbortController.signal.aborted) {\n        return false\n      }\n      loginAbortController.abort()\n      return true\n    }\n    const previousLegacyKeychain = await readActiveClaudeKeychainCredentials()\n    let captured: CapturedClaudeAuth | null = null\n    let captureError: unknown = null\n    let cleanupError: unknown = null\n    try {\n      if (loginAbortController.signal.aborted) {\n        throw new Error('Claude sign-in was cancelled.')\n      }\n      await this.runClaudeCommand(['auth', 'login', '--claudeai'], tempConfig, LOGIN_TIMEOUT_MS, {\n        signal: loginAbortController.signal,\n        keepStdinOpen: true\n      })\n      this.cancelPendingClaudeLogin = null\n      const status = await this.runClaudeCommand(\n        ['auth', 'status', '--json'],\n        tempConfig,\n        STATUS_TIMEOUT_MS,\n        { allowFailure: true }\n      )\n      captured = await this.captureAuthFromConfigDir(\n        tempConfig.windowsPath,\n        status,\n        previousLegacyKeychain\n      )\n    } catch (error) {","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/claude-accounts/service.ts#L577-L613","documentation":"Thrown by runClaudeLoginAndCapture() when loginAbortController.signal.aborted is true at the point the flow checks it (after setup, before/after spawning `claude auth login`). It represents a user-initiated cancellation of the interactive sign-in. The abort can also propagate through the spawned CLI process via the signal.","triggerScenarios":"The user clicks 'Cancel' during the interactive Claude login, which calls cancelPendingClaudeLogin() -> loginAbortController.abort(). The next check of signal.aborted throws this error.","commonSituations":"User cancels a long-running OAuth login. A timeout or navigation away triggers cancellation. Programmatic cancel from a parent flow.","solutions":["Treat this error as an expected cancellation in the caller (catch and surface a 'cancelled' status, not an error).","Avoid retrying automatically — a cancel is intentional.","Ensure cancelPendingClaudeLogin is only called once (it returns false on a second abort).","If the signal appears aborted unexpectedly, check for an errant abort trigger upstream."],"exampleFix":"// before\nif (loginAbortController.signal.aborted) {\n  throw new Error('Claude sign-in was cancelled.')\n}\n\n// after — caller\ntry {\n  await runClaudeLoginAndCapture()\n} catch (error) {\n  if (error instanceof Error && error.message === 'Claude sign-in was cancelled.') {\n    return { cancelled: true }\n  }\n  throw error\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isLoginCancelled(error: unknown): boolean {\n  return error instanceof Error && error.message === 'Claude sign-in was cancelled.'\n}","tryCatchPattern":"try {\n  await runClaudeLoginAndCapture()\n} catch (error) {\n  if (isLoginCancelled(error)) {\n    return { cancelled: true }\n  }\n  throw error\n}","preventionTips":["Treat cancellation as an expected, non-error outcome.","Do not auto-retry a cancelled login.","Call cancelPendingClaudeLogin only once.","Wire the cancel button directly to the abort controller."],"tags":["claude-accounts","cancel","abort","login"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}