pub enum ApiError {
Show 14 variants
HttpError {
status: u16,
message: String,
},
RateLimitExceeded {
reset_at: DateTime<Utc>,
},
SecondaryRateLimit,
Timeout,
InvalidRequest {
message: String,
},
AuthenticationFailed,
AuthorizationFailed,
NotFound,
JsonError(Error),
HttpClientError(Error),
Configuration {
message: String,
},
TokenGenerationFailed {
message: String,
},
TokenExchangeFailed {
message: String,
},
GraphQlError {
message: String,
},
}Expand description
Errors during GitHub API operations.
These errors represent failures when communicating with the GitHub API, including HTTP errors, rate limiting, and parsing failures.
Variants§
HttpError
HTTP error response from GitHub API.
RateLimitExceeded
Rate limit exceeded. Operations should wait until reset time.
SecondaryRateLimit
Secondary rate limit (abuse detection) exceeded. Requires longer backoff period than primary rate limits.
Timeout
Request to GitHub API timed out.
InvalidRequest
The request was invalid (client error).
AuthenticationFailed
Authentication to GitHub API failed.
AuthorizationFailed
Authorization check failed (insufficient permissions).
NotFound
The requested resource was not found.
JsonError(Error)
Failed to parse JSON response from GitHub API.
HttpClientError(Error)
HTTP client error (network, TLS, etc.).
Configuration
Client configuration error.
TokenGenerationFailed
Failed to generate authentication token.
TokenExchangeFailed
Failed to exchange token.
GraphQlError
GraphQL API returned an application-level error.
GitHub’s GraphQL endpoint always returns HTTP 200; errors are reported
inside the response body under .errors[].message. This variant
captures the first such message. It is non-retryable because it
indicates a logic error in the query or variables, not a transient
infrastructure problem.
Implementations§
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ApiError
impl !RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl !UnwindSafe for ApiError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.