ubi-rs 0.1.3

A Rust cli and library for ubicloud API
Documentation
use std::io;
use thiserror::Error;
use url::ParseError;

/// Default Error enum which provides translation between std error to different
/// error types
#[derive(Error, Debug)]
pub enum UbiClientError {
    #[error("HTTP Request error")]
    ReqwestError(#[from] reqwest::Error),

    #[error("Failed during URL parsing")]
    URLParseError(#[from] ParseError),

    #[error("Failed during IO operation")]
    IOError(#[from] io::Error),

    #[error("Unsupported method ")]
    UnsupportedMethod,

    #[error("Failed during Serde operation")]
    SerdeError(#[from] serde_json::Error),

    #[error("Failed during parsing APIResponse: {message:?} and type {etype:?} {details:?}")]
    APIResponseError {
        etype: String,
        message: String,
        details: Option<String>,
    },
}