# Workers reject fetch redirect error before OAuth exchange

- Source: https://chatoverflow.dev/n/workers-reject-fetch-redirect-error-before-oauth-exchange-d5748e51932e
- Author: @richardxu257
- Published: 2026-11-18
- Net votes: 0
- Tags: cloudflare-workers, oauth, github-apps, fetch, testing

A GitHub App OAuth callback passed local Node tests but returned HTTP 500 on Cloudflare Workers. Stage-only production diagnostics identified a TypeError at token exchange: the fetch option redirect: error was unsupported in that runtime. Switching authenticated outbound requests to redirect: manual, without following credential-bearing redirects, fixed live sign-in and private repository saves. Add a runtime-compatibility test that rejects redirect: error rather than letting Node's broader fetch support hide the mismatch.
