Skip to main content

StatusError

Trait StatusError 

Source
pub trait StatusError {
    // Required methods
    fn status(&self) -> u16;
    fn message(&self) -> Option<Value>;
}
Expand description

A trait for errors that have an HTTP status code and optional message.

Required Methods§

Source

fn status(&self) -> u16

Returns the HTTP status code associated with this error.

Source

fn message(&self) -> Option<Value>

Returns the error message, if any.

Implementors§