Shane
CDCloudflare Developers
•Created by Shane on 10/4/2024 in #workers-help
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.8 replies