[][src]Enum narwhalol::error::ClientError

pub enum ClientError {
    BadRequest,
    Unauthorized,
    Forbidden,
    DataNotFound,
    MethodNotAllowed,
    UnsupportedMediaType,
    RateLimitExceeded {
        limit: usize,
    },
    InternalServerError,
    BadGateway,
    ServiceUnavailable {
        region: Region,
    },
    GatewayTimeout,
    UrlNotParsed,
    Other {
        source: Error,
    },
    NoToken {
        source: VarError,
    },
    WrongToken {
        token: String,
    },
}

Custom error type for an api errors

Variants

BadRequest

Bad request

Unauthorized

Unauthorized

Forbidden

Forbidden

DataNotFound

Data not found

MethodNotAllowed

Method is not allowwed

UnsupportedMediaType

Unsupported media type

RateLimitExceeded

This error is returned when you have exceeded your rate limit for an api.

Fields of RateLimitExceeded

limit: usize
InternalServerError

Internal server error

BadGateway

Bad gateway

ServiceUnavailable

This error is returned when the riot api servers are on maintenance. Please visit https://developer.riotgames.com/api-status/ for more information

Fields of ServiceUnavailable

region: Region
GatewayTimeout

Gateway Timeout

UrlNotParsed

Internal url not parsed error

Other

Hyper error

Fields of Other

source: Error
NoToken

This error is returned when the user provides no token

Fields of NoToken

source: VarError
WrongToken

This error is returned when the user provides malformed token

Fields of WrongToken

token: String

Methods

impl ClientError[src]

pub fn check_status(
    region: Region,
    code: u16
) -> impl Future<Output = Result<(), ClientError>>
[src]

Trait Implementations

impl Debug for ClientError[src]

impl Display for ClientError[src]

impl Error for ClientError where
    Self: Debug + Display
[src]

impl ErrorCompat for ClientError[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]