Skip to main content

map_sqlx_error

Function map_sqlx_error 

Source
pub fn map_sqlx_error(err: Error) -> EngineError
Expand description

Convert a sqlx::Error into an EngineError.

Kept as a free function (rather than a From impl) so call sites can thread extra context (method label, key, etc.) through ff_core::engine_error::backend_context alongside. A blanket From<sqlx::Error> for EngineError is also provided below for ergonomics in ? chains where no extra context is needed.