Enum rawr::errors::APIError
[−]
[src]
pub enum APIError { ExhaustedListing, HTTPError(StatusCode), HyperError(Error), JSONError(Error), }
Error type that occurs when an API request fails for some reason.
Variants
ExhaustedListing | Occurs when a listing has run out of results. Only used internally - the | |
HTTPError | Occurs when the API has returned a non-success error code. Important status codes include: - 401 Unauthorized - this usually occurs if your tokens are incorrect or invalid - 403 Forbidden - you are not allowed to access this, but your request was valid. | |
HyperError | Occurs if the HTTP response from Reddit was corrupt and Hyper could not parse it. | |
JSONError | Occurs if JSON deserialization fails. This will always be a bug, so please report it if it does occur, but the error type is provided so you can fail gracefully. |
Trait Implementations
impl Display for APIError
[src]
impl Error for APIError
[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.