pub enum ForgeError {
Show 13 variants
Transport(TransportError),
Unprocessable {
request: RequestLabel,
body: RejectionBody,
},
CapabilityUnavailable {
request: RequestLabel,
},
Config(ConfigError),
OwnAppBypassWithoutApp {
ruleset: RulesetName,
},
RuleDecode {
ruleset: String,
source: Box<ValueError>,
},
RuleParametersDecode {
ruleset: String,
rule: String,
source: Box<ValueError>,
},
InvitationRoleUnsupported,
AmbiguousPullRequest {
head: String,
base: String,
},
InvalidAssetFilename {
filename: String,
},
ReleaseImmutable {
id: u64,
},
InvalidUploadUrl {
id: u64,
template: String,
},
EmptyCallerLogin(EmptyUserName),
}Expand description
Anything that stops a GitHub request from producing a usable answer.
Variants§
Transport(TransportError)
Transport trouble: unreachable, a bad credential, a missing resource, a rate limit, a rejected body, or a body this build cannot read.
Unprocessable
GitHub answered 422: it read the request and found it invalid.
Fields
request: RequestLabelThe method and path that were attempted.
body: RejectionBodyWhat GitHub answered with.
The repository or plan lacks the capability the route needs (for example, repository rulesets).
Config(ConfigError)
The configuration has a value GitHub would refuse.
OwnAppBypassWithoutApp
A ruleset lets the acting App bypass it, but the caller is not an App.
Fields
ruleset: RulesetNameThe ruleset’s name.
RuleDecode
A rule in a live ruleset has no readable type.
RuleParametersDecode
The parameters of a rule in a live ruleset do not decode.
Fields
InvitationRoleUnsupported
A pending invitation cannot be changed to a custom role.
AmbiguousPullRequest
More than one open pull request matched the proposal’s head and base.
InvalidAssetFilename
A release asset filename cannot address a safe upload path.
ReleaseImmutable
The release is already published, so it is immutable.
InvalidUploadUrl
The release’s upload URL template does not parse as a URL.
EmptyCallerLogin(EmptyUserName)
The forge answered the current user request with an empty login.
Implementations§
Trait Implementations§
Source§impl Debug for ForgeError
impl Debug for ForgeError
Source§impl Display for ForgeError
impl Display for ForgeError
Source§impl Error for ForgeError
impl Error for ForgeError
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()