workers-sdk
workers-sdk copied to clipboard
🐛 BUG: START CF API RESPONSE: Internal Server Error 500 / not authorized [code: 7500] when ingesting SQL file to D1
Which Cloudflare product(s) does this pertain to?
D1
What version(s) of the tool(s) are you using?
wrangler 3.34.2
What version of Node are you using?
No response
What operating system and version are you using?
macOS 14.4 23E214 x86_64
Describe the Bug
Observed behavior
# download gallery.sql from https://gist.github.com/tddschn/466697d595faa17e09dc4bc04b68e53e
# npx wrangler d1 create gallery
npx wrangler d1 execute gallery --file data/gallery.sql remote
⛅️ wrangler 3.34.2
-------------------
🌀 Mapping SQL input into an array of statements
🌀 Parsing 4318 statements
🌀 Executing on remote database gallery (ac2ccf8a-a02f-46e6-a134-d9f218a3a80d):
🌀 To execute on your local development database, remove the --remote flag from your wrangler command.
✘ [ERROR] A request to the Cloudflare API (/accounts/account_id/d1/database/ac2ccf8a-a02f-46e6-a134-d9f218a3a80d/query) failed.
not authorized [code: 7500]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose
Re-run with WRANGLER_LOG_SANITIZE=false WRANGLER_LOG=debug:
-- END CF API REQUEST
-- START CF API RESPONSE: Internal Server Error 500
HEADERS: {
"cf-cache-status": "DYNAMIC",
"cf-ray": "866dc6648ebd4548-ATL",
"connection": "keep-alive",
"content-encoding": "gzip",
"content-type": "application/json; charset=UTF-8",
"date": "Tue, 19 Mar 2024 13:23:12 GMT",
"server": "cloudflare",
"set-cookie": "__cfruid=redacted-1710854592; path=/; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None",
"transfer-encoding": "chunked",
"vary": "Accept-Encoding"
}
RESPONSE: {
"result": [],
"success": false,
"errors": [
{
"code": 7500,
"message": "not authorized"
}
],
"messages": []
}
-- END CF API RESPONSE
Expected behavior
Ingest the sql to d1 successfully.
Steps to reproduce
Please see the code above.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response