wip: feat: define response body enum
This commit is contained in:
parent
7cb25a7743
commit
008b62a925
12 changed files with 215 additions and 104 deletions
|
|
@ -84,35 +84,15 @@ pub enum RpxyError {
|
|||
#[error("Failed to fetch from upstream: {0}")]
|
||||
FailedToFetchFromUpstream(String),
|
||||
|
||||
// Cache errors,
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Invalid null request and/or response")]
|
||||
NullRequestOrResponse,
|
||||
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Failed to write byte buffer")]
|
||||
FailedToWriteByteBufferForCache,
|
||||
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Failed to acquire mutex lock for cache")]
|
||||
FailedToAcquiredMutexLockForCache,
|
||||
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Failed to create file cache")]
|
||||
FailedToCreateFileCache,
|
||||
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Failed to write file cache")]
|
||||
FailedToWriteFileCache,
|
||||
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Failed to open cache file")]
|
||||
FailedToOpenCacheFile,
|
||||
|
||||
// Upstream connection setting errors
|
||||
#[error("Unsupported upstream option")]
|
||||
UnsupportedUpstreamOption,
|
||||
|
||||
// Cache error map
|
||||
#[cfg(feature = "cache")]
|
||||
#[error("Cache error: {0}")]
|
||||
CacheError(#[from] crate::forwarder::CacheError),
|
||||
|
||||
// Others
|
||||
#[error("Infallible")]
|
||||
Infallible(#[from] std::convert::Infallible),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue