#[non_exhaustive]pub enum CamelError {
Show 25 variants
ComponentNotFound(String),
EndpointCreationFailed(String),
ProcessorError(String),
ProcessorErrorWithSource(String, Arc<dyn Error + Send + Sync>),
TypeConversionFailed(String),
InvalidUri(String),
ChannelClosed,
RouteError(String),
Io(String),
DeadLetterChannelFailed(String),
CircuitOpen(String),
HttpOperationFailed {
method: String,
url: String,
status_code: u16,
status_text: String,
response_body: Option<String>,
},
ConsumerStopping,
Config(String),
ConfigValidation(ConfigValidationError),
AlreadyConsumed,
StreamLimitExceeded(usize),
Unauthenticated(String),
Unauthorized(String),
AuthProviderUnavailable(String),
ValidationError(String),
TemplateReload(String),
EndpointUri(EndpointUriError),
UnsupportedMediaType {
consumed: String,
declared: String,
},
NotAcceptable {
accept: String,
produced: String,
},
}Expand description
Core error type for the Camel framework.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ComponentNotFound(String)
EndpointCreationFailed(String)
ProcessorError(String)
ProcessorErrorWithSource(String, Arc<dyn Error + Send + Sync>)
Like ProcessorError but preserves the source error chain
for downstream inspection (e.g. via std::error::Error::source()).
TypeConversionFailed(String)
InvalidUri(String)
ChannelClosed
RouteError(String)
Io(String)
DeadLetterChannelFailed(String)
CircuitOpen(String)
HttpOperationFailed
Fields
ConsumerStopping
Producer call() failed on a shutdown signal — the consumer/semaphore
is closing and the producer cannot acquire a permit. Distinct from Stop EIP
(which is successful control flow). Used by JMS/OpenSearch producers. See ADR-0024.
Config(String)
ConfigValidation(ConfigValidationError)
Typed security-validation error (ADR-0033). Promotes Batch 1+ config/startup
failure modes from stringly-typed Config(_) to a matchable enum so
operators can discriminate programmatically.
AlreadyConsumed
StreamLimitExceeded(usize)
Unauthenticated(String)
Auth provider (JWKS/introspection/token endpoint) is unreachable or failing. Promotes the auth-provider-down signal from a stringly-typed ProcessorError to a matchable variant; WebSocket and gRPC transports map it to 503 / UNAVAILABLE.
ValidationError(String)
TemplateReload(String)
EndpointUri(EndpointUriError)
Typed endpoint-URI construction error (see EndpointUriError). Promotes the
fail-closed EndpointUri merge failures from stringly-typed errors to a matchable
variant so operators can discriminate programmatically.
UnsupportedMediaType
The request body media type does not match the declared/consumed type (REST DSL default-strict content negotiation, HTTP 415).
NotAcceptable
The response representation cannot satisfy the client’s Accept header (REST DSL default-strict content negotiation, HTTP 406).
Implementations§
Source§impl CamelError
impl CamelError
pub fn classify(&self) -> &'static str
Sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Stable variant name used by doTry catch-by-variant matchers.
ProcessorErrorWithSource and AuthProviderUnavailable alias to
"ProcessorError" — the variants are not distinguishable by name in MVP (see spec §5.4),
so existing doTry catch handlers keep matching.
The enum is #[non_exhaustive]; this match lives in the defining crate (camel-api),
so internal exhaustive matching is allowed. Adding a new variant without updating
this method will fail to compile, surfaced by variant_name_tests.
Trait Implementations§
Source§impl Clone for CamelError
impl Clone for CamelError
Source§impl Debug for CamelError
impl Debug for CamelError
Source§impl Display for CamelError
impl Display for CamelError
Source§impl Error for CamelError
impl Error for CamelError
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()