Skip to main content

to_expression_failed

Function to_expression_failed 

Source
pub fn to_expression_failed(err: LanguageError, meta: &EvalMeta) -> CamelError
Expand description

Map a LanguageError onto CamelError::ExpressionFailed using the trusted route metadata.

The class and position come from the error itself (defaulting to class Runtime, position None when the variant carries none). ConversionError populates conversion; when its target is a generic placeholder (see GENERIC_TARGETS) and meta.target is known, the placeholder is rewritten to the trusted destination. Runtime-derived strings (script map keys, exchange header keys) are never written into the ConversionDetail.

The cause carries a fixed redacted detail (via LanguageError::redacted_detail) when the error variant has a payload that is contractually free of exchange/provider data; free-form payloads keep cause: None.