Multi-host auth (tokens in OS keychain), repo/issue/pr CRUD, and a gh-style `api` escape hatch with -f/-F/-X/-q. Targets Forgejo 7.x via the Gitea-compatible /api/v1 surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
14 lines
393 B
Rust
14 lines
393 B
Rust
use reqwest::StatusCode;
|
|
use thiserror::Error;
|
|
|
|
/// A non-2xx response from the Forgejo API. We surface the parsed `message`
|
|
/// when one is available and keep the raw body for `--debug` style output.
|
|
#[derive(Debug, Error)]
|
|
#[error("HTTP {status} from {url}: {message}")]
|
|
pub struct ApiError {
|
|
pub status: StatusCode,
|
|
pub url: String,
|
|
pub message: String,
|
|
pub body: String,
|
|
}
|