Trait thruster::errors::ErrorSet

source ·
pub trait ErrorSet<C> {
    // Required methods
    fn parsing_error(context: C, error: &str) -> ThrusterError<C>;
    fn generic_error(context: C) -> ThrusterError<C>;
    fn unauthorized_error(context: C) -> ThrusterError<C>;
    fn not_found_error(context: C) -> ThrusterError<C>;
    fn server_error(context: C) -> ThrusterError<C>;
}

Required Methods§

source

fn parsing_error(context: C, error: &str) -> ThrusterError<C>

Error specifically caused by parsing the incoming requests.

source

fn generic_error(context: C) -> ThrusterError<C>

Generic error for generalized or obfuscated bad requests.

source

fn unauthorized_error(context: C) -> ThrusterError<C>

Error used for unauthorized access.

source

fn not_found_error(context: C) -> ThrusterError<C>

Error when a resource is not found.

source

fn server_error(context: C) -> ThrusterError<C>

An error denoting a failure on the server side.

Implementors§