Enum github::error::ErrorCode [-] [+] [src]

pub enum ErrorCode {
    Missing,
    MissingField,
    Invalid,
    AlreadyExists,
    Unknown(String),
}

Documentation References: https://developer.github.com/v3/#client-errors ErrorCode represents the type of error that was reported as a response on a request to th Github API.

Variants

Missing

This means a resource does not exist.

MissingField

This means a required field on a resource has not been set.

Invalid

This means the formatting of a field is invalid. The documentation for that resource should be able to give you more specific information.

AlreadyExists

This means another resource has the same value as this field. This can happen in resources that must have some unique key (such as Label names).

Unknown

Unknown(String) is used as a last resort when an error code is unknown. This should never happen, please report/resolve the issue when it does happen.

Trait Implementations

impl Display for ErrorCode

Allowing ErrorCode to be printed via {}.

fn fmt(&self, f: &mut Formatter) -> Result

impl Decodable for ErrorCode

Allowing ErrorCode to be decoded from json values. Linked to the error key as defind by the ErrorContext struct's member.

fn decode<D: Decoder>(d: &mut D) -> Result<ErrorCode, Error>

Derived Implementations

impl Debug for ErrorCode

fn fmt(&self, __arg_0: &mut Formatter) -> Result