Fix malformed API token auth handling#393
Open
mattzcarey wants to merge 2 commits into
Open
Conversation
ee9fa2e to
d24d050
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/user+/accounts400 identity-probe failures to 401 malformed-token responses.console.errortoconsole.warnand make 403 scope failures clearer.Why
Fleet logs showed malformed direct-token requests producing noisy errors and potential user-facing 500s. These are client auth failures, not server failures.
Validation
pnpm --filter @repo/mcp-common testpnpm --filter @repo/mcp-common check:typespnpm exec turbo check:types --filter=@repo/mcp-common --filter=cloudflare-ai-gateway-mcp-server --filter=auditlogs --filter=cloudflare-autorag-mcp-server --filter=cloudflare-browser-mcp-server --filter=cloudflare-casb-mcp-server --filter=dex-analysis --filter=dns-analytics --filter=graphql-mcp-server --filter=logpush --filter=cloudflare-radar-mcp-server --filter=containers-mcp --filter=workers-bindings --filter=workers-builds --filter=workers-observability --filter=docs-ai-search --filter=docs-vectorizepnpm check:format(passes; prettier plugin prints existingimport sorting aborted due to babel parsing errorwarning)Note:
pnpm typesstill fails on@repo/mcp-observabilitybecause that package has no Wrangler config; targeted typechecks above pass.