Skip to main content

contextualize_sqlx_error

Function contextualize_sqlx_error 

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

Inspect a sqlx::Error and, if it carries a SQLSTATE we know how to explain, return a richer Error variant. Otherwise the input is wrapped in Error::Database unchanged so callers can keep using ?.