Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`workers versions list` and `get` return 500 for a Worker with a placement region

Aperta
#226 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api

Direzione di ricerca

The report identifies the failing cf workers versions list and get commands and the API endpoint, but says the serialization error comes from the Workers API rather than the CLI. Start by tracing the versions commands to the API request and checking whether this repository contains relevant tests or handling for placement. Done means versions for a Worker with placement can be read successfully, including the placement and startup time.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

upstream
Summary of the issue

cf workers versions list and cf workers versions get fail with a 500 for any Worker deployed with a placement region. The API cannot serialize the version's placement:

json: error calling MarshalJSON for type *placement.Placement: invalid placement target type:

The Worker is configured in cloudflare.config.ts with:

placement: { region: 'aws:eu-central-1' }

cf deploy accepts this and the Worker runs with it. Only reading a version back fails. The same commands work on a Worker without placement in the same account. cf workers deployments list works on the affected Worker.

Expected behaviour

cf workers versions list --worker-id <worker> returns the versions, including startup_time_ms and the placement, as it does for a Worker without placement.

Version of cf used

1.0.0-beta.12

System information and package versions
  System:
    OS: macOS 26.7.1
    CPU: (11) arm64 Apple M3 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.18.0
    npm: 11.16.0
    pnpm: 12.8.1
Reproduction (optional)
  1. Deploy a Worker with placement: { region: 'aws:eu-central-1' } in cloudflare.config.ts (cf deploy).
  2. cf workers versions list --worker-id <worker> --per-page 1
  3. cf workers versions get <version-id> --worker-id <worker>

Both return the 500 below. Running step 2 on a Worker without placement returns its versions normally.

Relevant error logs (optional)
┌ APIError
│ Status code: 500
│ Body: "json: error calling MarshalJSON for type *placement.Placement: invalid placement target type: \n"
│ 500 Internal Server Error · HTTP /accounts/<account_id>/workers/workers/<worker>/versions?per_page=1
└

The error comes from the API (GET /accounts/{account_id}/workers/workers/{worker_id}/versions), not the CLI. It may belong with the Workers API team, but cf has no other way to read a version, so I'm filing it here.

Lingua principale
TypeScript
Stelle
916
Fork
53
Merge medio
18h 37m
PR unite (30g)
197

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/cf

Tutte le issue di cloudflare/cf

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.