#[non_exhaustive]pub enum SubRequestError {
InvalidRequest(String),
AdmissionTimeout {
max_connections: usize,
},
Connect(String),
Io(String),
DeadlineExceeded,
StreamIdleTimeout {
idle_timeout: Duration,
},
CircuitOpen {
peer: String,
},
ResponseTooLarge {
actual: usize,
limit: usize,
},
}Expand description
Errors from sub-request execution.
Typed so callers can map transport failures to appropriate HTTP status codes without inspecting error strings.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidRequest(String)
Failed to construct a valid request (bad headers, URI, etc.).
AdmissionTimeout
The concurrency admission semaphore timed out before a slot became available.
Connect(String)
Failed to connect to the upstream.
Io(String)
Failed to write the request or read the response.
DeadlineExceeded
The overall deadline expired.
StreamIdleTimeout
The upstream stopped sending data for longer than the idle timeout.
CircuitOpen
The circuit breaker for the target peer is open.
ResponseTooLarge
Response body exceeded the size limit.
Trait Implementations§
Source§impl Debug for SubRequestError
impl Debug for SubRequestError
Source§impl Display for SubRequestError
impl Display for SubRequestError
Source§impl Error for SubRequestError
impl Error for SubRequestError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SubRequestError
impl RefUnwindSafe for SubRequestError
impl Send for SubRequestError
impl Sync for SubRequestError
impl Unpin for SubRequestError
impl UnsafeUnpin for SubRequestError
impl UnwindSafe for SubRequestError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more