Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/swarm-controller/src/issue_report.rs
Author SHA1 Message Date
atlas
244db367c4 swarm-controller: answer 404, not 503, for an issue-report on a nonexistent repo
get_issue_report mapped every error from Client::issue_report to 503
(StatusUnavailable) unconditionally. issue_report calls
issue_list_issues(org, repo, ...) first, and a Forgejo 404 there — a
typo'd or deleted repo — was flattened into the same 503 a genuine
forge outage produces, which tells a client to retry a request that
will never succeed.

Downcast the anyhow error back to forgejo_api::ForgejoError (same
pattern main.rs's wanted_error_status uses for
swarm_queue_client::Error) and check it structurally against the
ApiErrorKind::NotFound / UnexpectedStatusCode(404) shapes forgejo's
generated client produces for a 404, rather than string-matching the
rendered message. Only that case answers 404, naming the org/repo;
every other forge failure still answers 503. Updates the route's
OpenAPI response list to document the 404.

Closes #4701
2026-09-24 16:38:47 +02:00
damocles
c48c8b1991 swarm-controller: fix broken intra-doc link in issue_report.rs 2026-08-31 18:50:38 +02:00
damocles
586f7f68c2 swarm-controller: stop narrating pr review history in doc comments 2026-08-31 18:50:38 +02:00
damocles
957291e3a7 swarm-controller: split issue-report handlers into their own module 2026-08-31 18:50:38 +02:00