Worker API inconsistency

I can get the "Upload Version" endpoint to work, but not the "Upload Worker Module" endpoint even though they use the same fetch body. The "Upload Worker Module" endpoint returns this error:
{
result: null,
success: false,
errors: [ { code: 10013, message: 'workers.api.error.unknown' } ],
messages: []
}
{
result: null,
success: false,
errors: [ { code: 10013, message: 'workers.api.error.unknown' } ],
messages: []
}
A minimal reproduction is here: https://github.com/shanecash/cf-upload-worker-module The problem is summarized in this file with comments: https://github.com/shanecash/cf-upload-worker-module/blob/main/index.js Clone, npm install , rename .env-example to .env and replace the Cloudflare API account and API key placeholders, then run node index.js (I'm using Node v20+). From what I've gathered here, the "Upload Worker Module" endpoint should create the Worker if it doesn't exist? If that's true then I'm lost as to what's going on since the fetch works on a similar endpoint. Any help would be greatly appreciated.
GitHub
GitHub - shanecash/cf-upload-worker-module
Contribute to shanecash/cf-upload-worker-module development by creating an account on GitHub.
GitHub
cf-upload-worker-module/index.js at main · shanecash/cf-upload-work...
Contribute to shanecash/cf-upload-worker-module development by creating an account on GitHub.
7 Replies
Walshy
Walshy•3mo ago
What's your account ID?
Shane
ShaneOP•3mo ago
Account ID: 1b09090caf812db256cc6a9a00315d75 The version tests were done on worker: royal-feather-4e5a I realized "usage_model" was unnecessarily set. I removed it, but it made no difference. The reproduction repo now reflects that change.
Walshy
Walshy•3mo ago
not seen this error before... are you using an account api token by chance?
Shane
ShaneOP•3mo ago
Yep. It has full Worker permissions. I also tried it on another account and the same thing happens. Appreciate the help BTW.
No description
texan
texan•3mo ago
Good call Walshy, I bet that's it. Seeing 403 on email validation checks. Something might not be plumbed right for AoTs
Walshy
Walshy•3mo ago
Yeah makes sense... we're gonna need to figure out how to do that check on AOT :thonkconga:
texan
texan•2mo ago
@Shane a fix is going out today 🙂
Want results from more Discord servers?
Add your server