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:
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
What's your account ID?
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.
not seen this error before... are you using an account api token by chance?
Yep. It has full Worker permissions. I also tried it on another account and the same thing happens. Appreciate the help BTW.
Good call Walshy, I bet that's it. Seeing 403 on email validation checks. Something might not be plumbed right for AoTs
Yeah makes sense... we're gonna need to figure out how to do that check on AOT :thonkconga:
@Shane a fix is going out today 🙂