Skip to content

/api/slots/{name}/config returns 404 (not 400) for unknown slot #35

@thinmintdev

Description

@thinmintdev

What to build

GET /api/slots/doesntexist returns 404 with code slot.not_found, but GET /api/slots/doesntexist/config returns 400 with code slot.config_error: slot config /etc/hal0/slots/doesntexist.toml not found and no in-memory state. A UI distinguishing "slot doesn't exist" from "slot exists but config is bad" gets ambiguous signals.

Map "no config file AND no in-memory state" to SlotNotFound (404) upstream in the slot manager's get_config() method.

Acceptance criteria

  • GET /api/slots/doesntexist/config returns 404 with code slot.not_found
  • An existing slot with a syntactically invalid TOML config still returns 400 with code slot.config_error
  • Unit test covers both branches

Blocked by

None - can start immediately


Sourced from tests/harness/FINDINGS.md §19 (low).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions