[][src]Enum bindle::client::ClientError

pub enum ClientError {
    InvalidURL(ParseError),
    InvalidConfig(String),
    Io(Error),
    InvalidToml(Error),
    TomlSerializationError(Error),
    HttpClientError(Error),
    InvalidId(ParseError),
    InvoiceNotFound,
    ParcelNotFound,
    InvoiceAlreadyExists,
    ParcelAlreadyExists,
    InvalidRequest {
        status_code: StatusCode,
        message: Option<String>,
    },
    ServerError(Option<String>),
    Unauthorized,
    Other(String),
}

Describes the various errors that can be returned from the client

Variants

InvalidURL(ParseError)

Indicates that the given URL is invalid, contains the underlying parsing error

InvalidConfig(String)

Invalid configuration was given to the client

Io(Error)

IO errors from interacting with the file system

InvalidToml(Error)

Invalid TOML parsing that can occur when loading an invoice or label from disk

TomlSerializationError(Error)

Invalid TOML serialization that can occur when serializing an object to a request

HttpClientError(Error)

There was a problem with the http client. This is likely not a user issue. Contains the underlying error

InvalidId(ParseError)

An invalid ID was given. Returns the underlying parse error

InvoiceNotFound

The invoice was not found. Note that this does not necessarily mean it doesn't exist. It could also be hidden because it is yanked or due to user permissions

ParcelNotFound

The parcel was not found.

InvoiceAlreadyExists

The invoice already exists

ParcelAlreadyExists

The parcel already exists.

InvalidRequest

The error returned when the request is invalid. Contains the underlying HTTP status code and any message returned from the API

Fields of InvalidRequest

status_code: StatusCodemessage: Option<String>
ServerError(Option<String>)

A server error was encountered. Contains an optional message from the server

Unauthorized

Invalid credentials were used or user does not have access to the requested resource. This is only valid if the server supports authentication and/or permissions

Other(String)

A catch-all for uncategorized errors. Contains an error message describing the underlying issue

Trait Implementations

impl Debug for ClientError[src]

impl Display for ClientError[src]

impl Error for ClientError[src]

impl From<ClientError> for ProviderError[src]

impl From<Error> for ClientError[src]

impl From<Error> for ClientError[src]

impl From<Error> for ClientError[src]

impl From<Error> for ClientError[src]

impl From<Infallible> for ClientError[src]

impl From<ParseError> for ClientError[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,