Move /api/1/ related proxy functionality
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Error handling and reporting.
|
||||
*/
|
||||
|
||||
use http::header::InvalidHeaderValue;
|
||||
use http::uri::InvalidUri;
|
||||
use nom::error::ErrorKind;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -11,6 +12,7 @@ use std::num::{ParseFloatError, ParseIntError};
|
||||
use std::string::FromUtf8Error;
|
||||
use std::sync::PoisonError;
|
||||
use tokio::task::JoinError;
|
||||
use tokio::time::error::Elapsed;
|
||||
|
||||
/**
|
||||
The common error type for this application.
|
||||
@@ -240,6 +242,18 @@ impl<T> From<PoisonError<T>> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<InvalidHeaderValue> for Error {
|
||||
fn from(k: InvalidHeaderValue) -> Self {
|
||||
Self::with_msg(format!("{:?}", k))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Elapsed> for Error {
|
||||
fn from(k: Elapsed) -> Self {
|
||||
Self::with_msg(format!("{:?}", k))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn todo() {
|
||||
todo!("TODO");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user