Skip to content

[Request]: make configuration and CLI errors say what, where and how to fix #581

Closed

Description

@jimhoyd

Problem or use case

No error gives file:line, and several point at the wrong thing. Graded during the audit:

Mistake Message today Problem
Two handlers on one route missing required key "function" misleading
Handler typo redirct: / respnd: missing required key "redirect" at /routes/~1… unknown key not named; JSON-pointer ~1 escaping
redirect.to instead of url missing required key "url" to not mentioned
status: 299 (enum) allowed values not listed
YAML indentation / syntax Invalid YAML: check syntax, duplicate keys and tags no line/column
Missing function file; context before init; validate outside a project Referenced project file is missing no path; no "run init" / "no urlcode.yaml in "
Missing --project dir Configuration loading failed no path
{id} without parameters Every path placeholder requires an input declaration no route, no fix
Static route without /* Static routes require a terminal /* wildcard no route
Secret without a policy Secret binding denied by operator policy no route; no pointer to permissions/--policy
sandbox: true + node:crypto Only relative project JavaScript imports are allowed file/import not named
Malformed fixture JSON, docs search "--policy", --budget 100, --project without a value Operation failed; check project files, module dependencies and command options generic
dev --prot 3000 Unknown option; use --help option not named
Function with --target cloudflare route + capability + reason good, but no alternative target suggested

The route-level unknown key "methodz"; did you mean "methods"? is the model to copy. Errors are emitted as {"event":"error","message"} only.

Proposed behavior and alternatives

Report unknown keys with did-you-mean at every level (including handler names), detect multiple handlers explicitly, print route paths unescaped, list enum values, pass the YAML parser's line/column through, name missing paths/options/imports, and point policy errors at urlcode permissions. Add structured fields to error events (code, route, file, line, pointer) so agents can act without parsing prose.

Activity

  1. added
    enhancement
    ai-first
    on Sep 23, 2026
  2. added 2 commits that reference this issue on Sep 24, 2026
  3. jimhoyd commented on Sep 27, 2026

    @jimhoyd
    CollaboratorAuthor

    Additional observed diagnostic case from a sandboxed benchmark using 0.6.4: repeated urlcode init attempts in the assigned workspace and empty child directories returned only Operation failed; check project files, module dependencies and command options. Initialization under the arm-private TMPDIR succeeded; copying the scaffold into the assigned workspace allowed implementation to continue. Package extraction separately warned EPERM for starters/default/.mcp.json.

    The exact cause of the init failure has not been independently reproduced, and the extraction warning does not establish its cause. This is not a claim that the current release still fails. A regression case worth checking is a scaffold destination where one generated configuration file is blocked by a sandbox: report the failing operation and safe relative target with a stable error code, without leaking host paths. The generic fallback caused repeated retries before any application code was written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions