Skip to content

wrangler only validates unexpected fields in the top level environment #11956

@emily-shen

Description

@emily-shen

What versions & operating system are you using?

wrangler 4.59.2

Please provide a link to a minimal reproduction

see below for wrangler config

Describe the Bug

{
"compatibility_date": "2025-07-14",
"compatibility_flags": [],
"main": "src/index.ts",
"name": "worker",
"env": {
"prod": {
"what": "fake"
}
},
}

should warn that 'what' is an unexpected field but doesn't

at a glance we need to add this check to (all?) environments: https://github.com/cloudflare/workers-sdk/blob/main/packages/workers-utils/src/config/validation.ts#L409

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions