Enum github_rs::github::GithubError
[−]
[src]
pub enum GithubError { JsonParsingSyntax(ErrorCode, usize, usize), JsonParsingIo(Error), JsonParsingFromUtf8(FromUtf8Error), Request, RequestMethod, RequestUri(ParseError), RequestVersion, RequestHeader, RequestTooLarge, RequestStatus, RequestIo(Error), RequestSsl(Box<Error + Send + Sync>), RequestHttp2(Http2Error), RequestUtf8(Utf8Error), NonJsonBody, InvalidFields, Unauthorized, QueryLimit, LibIo(Error), LibError, }
Errors related to improper usage of the API
Variants
JsonParsingSyntax(ErrorCode, usize, usize)
Encountered if serde cannot deserialize JSON returned from the API or it cannot serialize a struct into JSON to be sent to the API.
JsonParsingIo(Error)
While parsing with serde an IO error occured.
JsonParsingFromUtf8(FromUtf8Error)
While converting from Utf8 into a byte string for the request to the API an error occured
Request
A General error for the hyper library when none of the other errors work for it.
RequestMethod
While setting up the method for the request an error occurred (i.e. PST
instead of
POST
)
RequestUri(ParseError)
While parsing the Uri for the request an error occurred
RequestVersion
An error occured with the version used to communicate (i.e. HTP/1.1
instead of
HTTP/1.1
)
RequestHeader
An error in creating the header occurred making the request invalid
RequestTooLarge
The request being sent is far to large to work
RequestStatus
An invalid status code was retuned
RequestIo(Error)
While performing an IO action with hyper an error occurred
RequestSsl(Box<Error + Send + Sync>)
While intitiating, in the process of, or while terminating an SSL connection with the API an error occurred.
RequestHttp2(Http2Error)
While attemptin to make a connection via Http2 an error occured
RequestUtf8(Utf8Error)
An error within the byte string for the request to the API occured
NonJsonBody
Encountered if whatever was returned was not at all JSON
InvalidFields
Encountered if you've made a request with improper JSON. Most likely encountered where serde serializes a struct incorrectly, otherwise type checking prevents this error.
You aren't authorized to make the request. Make sure your token's scope allows you to make the call to the API that you would expect
QueryLimit
Github puts a rate limit on API calls (you get more if you're authenticated). If that happens you'll get this error.
LibIo(Error)
While performing an IO action within the github-rs library an error occured.
LibError
The catch all error. If it's not one of the above then something in the implementation of github-rs went absolutely wrong. A bug report is greatly appreciated if you encounter this error.
Trait Implementations
impl Debug for GithubError
[src]
impl Display for GithubError
[src]
impl Error for GithubError
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more
impl From<Error> for GithubError
[src]
fn from(serde: Error) -> Self
Performs the conversion.