Skip to content

fix: name token exchange and region failures, time out login requests - #1502

Draft
gewenyu99 wants to merge 3 commits into
mainfrom
vincent/login-error-causes
Draft

gewenyu99 wants to merge 3 commits into
mainfrom
vincent/login-error-causes

Conversation

@gewenyu99

@gewenyu99 gewenyu99 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

#1501 names the cause when the project or user fetch fails. Under TLS inspection, the OAuth token exchange and detectRegion fail first, and they still show a raw axios message. Login requests also have no timeout, so a dropped connection hangs.

Changes

  • The OAuth token exchange and detectRegion send network errors through handleApiError, so they get the same named-cause messages. The OAuth capture sends network_code.
  • ApiError carries networkCode, and failureProperties reads it from there.
  • The token exchange, detectRegion and the project and user fetches time out after 30 s each (LOGIN_REQUEST_TIMEOUT_MS). A timeout shows as "(timed out)".

Test plan

  • src/shared/__tests__/api-errors.test.ts: timeout message, detectRegion network failure.
  • src/tui/auth/__tests__/oauth.test.ts: token exchange with no response.
  • vitest run src/shared src/tui/auth and the API-key login tests: 790 passed. pnpm typecheck and ESLint pass.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

gewenyu99 and others added 2 commits October 29, 2026 16:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…auses

# Conflicts:
#	src/shared/__tests__/api-errors.test.ts
#	src/shared/api.ts
@gewenyu99 gewenyu99 changed the title fix: name the cause when a login request gets no response fix: name token exchange and region failures, time out login requests Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant