Open
Description
Describe the solution
I was trying to repro a user bug.
Creating a D1 DB failed with:
-> % pnpm wrangler d1 create test
⛅️ wrangler 4.16.0 (update available 4.16.1)
-------------------------------------------------------
✘ [ERROR] A request to the Cloudflare API (/accounts/XXX/d1/database) failed.
Authentication error [code: 10000]
Getting User settings...
👋 You are logged in with an OAuth Token, associated with the email [email protected].
┌──────────────┬──────────────────────────────────┐
│ Account Name │ Account ID │
├──────────────┼──────────────────────────────────┤
│ vicb │ YYY │
└──────────────┴──────────────────────────────────┘
🔓 Token Permissions: If scopes are missing, you may need to logout and re-login.
[...]
It tooks me quite a long time to figure out what was happening.
The root cause was that the user has configured their account_id=XXX
in the wrangler config and it was overriding my own account ID (YYY).
It would be nice to add a warning when we receive an Authentication error and the configures account_id
is different from the OAuth token.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Untriaged