Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#226 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
916
Forks
53
Avg merge
18h 31m
Merged PRs (30d)
172

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cf

All issues in cloudflare/cf

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.