You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
433 B
Rust
20 lines
433 B
Rust
use std::string::FromUtf8Error;
|
|
use thiserror::Error;
|
|
use warp::reject::Reject;
|
|
|
|
pub type MultihookResult<T> = Result<T, MultihookError>;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum MultihookError {
|
|
#[error(transparent)]
|
|
Warp(#[from] warp::Error),
|
|
|
|
#[error("Failed to parse body as utf8 string {0}")]
|
|
UTF8Error(#[from] FromUtf8Error),
|
|
|
|
#[error("Unknown endpoint")]
|
|
UnknownEndpoint,
|
|
}
|
|
|
|
impl Reject for MultihookError {}
|