feat: openssl based hoppscotch-relay for request forwarding (#4442)
This commit is contained in:
16
packages/hoppscotch-relay/src/error.rs
Normal file
16
packages/hoppscotch-relay/src/error.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error, Serialize)]
|
||||
pub enum RelayError {
|
||||
#[error("Invalid method")]
|
||||
InvalidMethod,
|
||||
#[error("Invalid URL")]
|
||||
InvalidUrl,
|
||||
#[error("Invalid headers")]
|
||||
InvalidHeaders,
|
||||
#[error("Request run error: {0}")]
|
||||
RequestRunError(String),
|
||||
}
|
||||
|
||||
pub type RelayResult<T> = std::result::Result<T, RelayError>;
|
||||
Reference in New Issue
Block a user