fabro/lib/crates/fabro-client
Bryan Helmkamp 15d5cac09b
refactor: simplify is_not_found_error and inline single-use ApiError factories
is_not_found_error now takes &anyhow::Error and uses api_failure_for to
discover the HTTP status structurally — works on errors after
map_api_error/classify_api_error rather than only on the raw progenitor
variant. Call site at delete_store_run inverts to map first, then check.

Inline seven single-use error factories at their sole call sites:
  no_stored_pull_request_error, pull_request_already_exists_error,
  missing_repo_origin_error, missing_base_branch_error,
  missing_run_branch_error, run_not_finished_error,
  run_not_successful_error.

Keep github_pull_request_not_found_error (3 call sites) and
empty_pull_request_diff_error (2 call sites) as named helpers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:47:21 -04:00
..
src refactor: simplify is_not_found_error and inline single-use ApiError factories 2026-04-23 23:47:21 -04:00
Cargo.toml refactor(pr): move pull request commands server-side 2026-04-23 19:23:52 -04:00