pub enum GithubAppError {
NotConfigured,
InvalidKey,
InvalidHeader,
ForeignOrigin,
Http(HttpError),
Status {
status: StatusCode,
rate_limit: RateLimit,
},
Decode(String),
OAuth(String),
}Expand description
Everything that can go wrong. Every message this crate builds carries no
token, client secret, JWT or part of the private key — with one exception,
GithubAppError::Decode, which carries the JSON parser’s own words.
Variants§
NotConfigured
No private key was configured, so there is nothing to sign with.
InvalidKey
A private key was configured but did not parse. The underlying parser message is deliberately not carried.
InvalidHeader
A value could not be put on the wire as an HTTP header.
ForeignOrigin
GithubApp::request was asked to send the installation token to a
URI outside the API base’s origin (scheme, host and port). Nothing was
minted or sent.
Http(HttpError)
The transport failed.
Status
GitHub answered a token or API call with a non-success status.
Fields
status: StatusCodeThe status GitHub returned.
Decode(String)
A body could not be read. The detail is the JSON parser’s own message (a field name and a position), and a parser that meets an unexpected value may quote it — so this is diagnostic text, not a guarantee that no part of the body appears. It is never logged by this crate; a caller that prints it is printing something a response chose.
OAuth(String)
GitHub’s OAuth endpoint reported an error. Carries GitHub’s error code only.
Trait Implementations§
Source§impl Debug for GithubAppError
impl Debug for GithubAppError
Source§impl Display for GithubAppError
impl Display for GithubAppError
Source§impl Error for GithubAppError
impl Error for GithubAppError
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()