Skip to content

fix(cli): name the record a 404 could not find - #1620

Merged
Goran Gajic (gorangajic) merged 1 commit into
goran/wiz-12140-cli-404-messagefrom
goran/wiz-12150-name-the-missing-record
Sep 17, 2026
Merged

Goran Gajic (gorangajic) merged 1 commit into
goran/wiz-12140-cli-404-messagefrom
goran/wiz-12150-name-the-missing-record

Conversation

@gorangajic

Copy link
Copy Markdown
Contributor

qawolf trigger get --trigger-id trg-1 on a trigger that does not exist answered "QA Wolf API could not find trigger.get (HTTP 404)" — the name of the endpoint, which reads as though the endpoint itself were gone. Issues, flows, agent sessions and files all said the same kind of thing.

Relates to WIZ-12150. Stacked on #1619, which fixed the same wording for runners, runs and environments; review that one first.

Overview of Changes

A 404 on one of these now names what was missing and the id it was asked for: QA Wolf has no trigger trg-1 (HTTP 404). A request that names no such record — a listing, a search — says it matched nothing rather than that it could not be found.

Where a record is looked up inside an environment, the record wins. Missing a trigger is not an environment problem, which is the thing this family of changes is about.

Testing

bun run typecheck
bun run lint
bun run format:check
bun run knip
bun run test
bun run build

Unit tests cover each named record, the case where a request scopes an environment as well, and the ids a route only takes as arguments (a workspace, a timezone) staying out of the message. Also run against a local stub answering 404 to check the real command output.

Checklist

  • Changes follow the code style of this project
  • Self-review completed
  • Tests added/updated (or not applicable)
  • No breaking changes (or described below)

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 2aedb83e-c3b9-40d2-955c-220bdfe9554e

📥 Commits

Reviewing files that changed from the base of the PR and between 8cf9c6d and 64c031b.

📒 Files selected for processing (7)
  • .changeset/name-the-missing-record.md
  • src/core/messages/authErrors.ts
  • src/core/publicApi/notFoundSubject.test.ts
  • src/core/publicApi/notFoundSubject.ts
  • src/shell/platform/callPublicApi.notFound.test.ts
  • src/shell/platform/describeNotFound.test.ts
  • src/shell/platform/describeNotFound.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


Walkthrough

The change adds record-specific 404 subjects for sessions, triggers, issues, flows, and files. Record IDs take precedence over environment IDs. Requests without a recognized record or environment subject report an unmatched request. Shell formatting now uses the record noun and ID. Tests cover subject resolution and 404 output.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: theonly1me

Sequence Diagram(s)

sequenceDiagram
  participant PublicAPI
  participant notFoundSubject
  participant describeNotFound
  PublicAPI->>notFoundSubject: resolve record or environment subject
  notFoundSubject-->>PublicAPI: return 404 subject
  PublicAPI->>describeNotFound: provide not-found subject
  describeNotFound-->>PublicAPI: return record-specific or unmatched-request message
Loading

Merge Risk: ⚪ Minimal · up to 64c03

The CLI now provides clearer 404 messages for missing records and unmatched requests without identified compatibility or runtime risk. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the Conventional Commits format, uses the allowed fix(cli) scope, uses imperative mood, describes the record-specific 404 change, and is under 72 characters.
Description check ✅ Passed The description includes the required overview, testing, and checklist sections. It explains the record-specific 404 behavior, related issue, test coverage, validation commands, and confirms checklist…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@gorangajic
Goran Gajic (gorangajic) marked this pull request as ready for review September 17, 2026 15:17
@gorangajic
Goran Gajic (gorangajic) added this pull request to stack #1621 September 17, 2026 15:17
A missing trigger read as "could not find trigger.get", which sounds like
the endpoint is gone rather than the record. Triggers, issues, flows, agent
sessions and files now answer with what was asked for and its id, and a
request with no such id says it matched nothing.
@gorangajic
Goran Gajic (gorangajic) force-pushed the goran/wiz-12150-name-the-missing-record branch from 8cf9c6d to 64c031b Compare September 17, 2026 19:26
@gorangajic Goran Gajic (gorangajic) changed the title Name the record a 404 could not find, not the endpoint fix(cli): name the record a 404 could not find Sep 17, 2026
@gorangajic
Goran Gajic (gorangajic) merged commit 42212e1 into main Sep 17, 2026
7 checks passed
@gorangajic
Goran Gajic (gorangajic) deleted the goran/wiz-12150-name-the-missing-record branch September 17, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants