pub enum RuntimeError {
Show 23 variants
Io(Error),
ChannelClosed,
ChannelFull,
BlockingInAsyncContext,
Timeout,
Cancelled,
TaskPanicked(Box<str>),
NoRuntime,
ScopeClosed,
ScopeDrainTimeout(usize),
Http(Arc<str>),
BadRequest(Box<str>),
MalformedBody(Box<str>),
Multipart(Box<str>),
Database(Box<str>),
Tls(Box<str>),
InvalidArgument(Box<str>),
Schedule(Box<str>),
MessageQueue(Box<str>),
Config(Box<str>),
Secret(Box<str>),
Dns(Box<str>),
Acme(Box<str>),
}Expand description
Common error type used across Camber runtime, HTTP, and support modules.
Variants§
Io(Error)
Wrapper for underlying I/O failures.
ChannelClosed
A channel send or receive failed because the other side was dropped.
ChannelFull
A non-blocking channel send failed because the buffer is full.
BlockingInAsyncContext
A blocking operation was requested from a single-thread async executor.
Timeout
An operation exceeded its configured timeout.
Cancelled
Cooperative cancellation was requested.
TaskPanicked(Box<str>)
A spawned task unwound with a panic payload.
NoRuntime
A runtime-requiring entry point was called with no runtime context.
ScopeClosed
Admission was attempted at or after the root scope’s close transition.
ScopeDrainTimeout(usize)
The bounded scope drain expired before every child exited on its own,
carrying how many the boundary found outstanding. Only the async subset
of that count was then aborted and joined: a non-preemptible blocking
child is counted here and cannot be force-stopped at all. So this counts
children that failed to exit cooperatively — not children still running
when run returns, and not children the drain managed to stop.
Http(Arc<str>)
An HTTP client, server, or protocol-level failure occurred.
BadRequest(Box<str>)
The caller supplied invalid request data.
MalformedBody(Box<str>)
A request body could not be parsed as its declared representation.
Carries the parser’s own account of the failure, which is operator detail: the HTTP rejection boundary answers the peer with fixed safe text and never with this string.
Multipart(Box<str>)
A multipart/form-data body could not be parsed.
Held apart from RuntimeError::MalformedBody so the two parsers stay
distinguishable through a handler’s ?, rather than being told apart
later by their text.
Database(Box<str>)
A database interaction failed.
Camber never constructs this variant — it ships no database layer. It is
provided so an application’s own data access code can report through the
same RuntimeError its handlers already return, instead of introducing a
second error type and a conversion at every ?.
Tls(Box<str>)
TLS setup or handshake failed.
InvalidArgument(Box<str>)
A public API was called with an invalid argument.
Schedule(Box<str>)
Schedule parsing or execution setup failed.
MessageQueue(Box<str>)
A message queue transport or protocol error occurred.
Config(Box<str>)
Configuration loading or validation failed.
Secret(Box<str>)
Secret loading or decoding failed.
Dns(Box<str>)
DNS provider or lookup handling failed.
Acme(Box<str>)
ACME certificate provisioning or renewal failed.
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeError
impl !UnwindSafe for RuntimeError
impl Freeze for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request