[][src]Enum fin_model::request::RequestError

pub enum RequestError {
    ConfigurationError(String),
    CommunicationError,
    AuthenticationError,
    AuthorizationError,
    BadSymbolError(String),
    BadRequestError,
    BadResponseError,
    RequestThrottled,
    Unsupported,
}

The common error responses returned from request traits.

Variants

ConfigurationError(String)

Usually a response from Provider::new this indicates that some error occurred due to missing or invalid configuration data.

CommunicationError

Failure to communicate with the service provider, where no additional information or specific type can be determined.

AuthenticationError

Failure to authenticate, this could be a wrapper around an OAuth error, or a missing/invalid token rejected by the service provider.

AuthorizationError

Your current session/identity does not permit the requested operation.

BadSymbolError(String)

The symbol you passed to the Provider is not valid.

BadRequestError

Something in the request was incorrect. This error may be returned from the local Provider implementation or wrap an error returned from the service provider.

BadResponseError

Something in the response from the service provider was incorrect. This error is usually returned from the local Provider implementation due to de-serialization failure.

RequestThrottled

The service provider is throttling requests, either globally or specifically for your identity.

Unsupported

This can be used to indicate that a given operation is unsupported by the Provider. This may mean that 1) it is not supported by the service provider itself, 2) it is not yet implemented by the Provider, or 3) may never be implemented. A provider implementation that returns this error should indicate in documentation why this is the case.

Methods

impl RequestError[src]

pub fn from_u16(code: u16) -> Option<Self>[src]

Return a RequestError from an HTTP status code as a u16 value.

Trait Implementations

impl Debug for RequestError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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