bookclerk_plugin_sdk::database_adapter::errors
Engine error classification for SQLite and PostgreSQL guests.
Classifies by SQLSTATE / rusqlite codes first. English substrings such as
"unique" are not the primary signal. COMMIT-time and connection-loss
failures are unavailable so the host retries the same operationId.
| Item | Kind | Summary |
|---|---|---|
plugin_error_from_engine |
function | Maps an engine / library failure onto a structured PluginError. |
plugin_error_from_db_err |
function | Maps a SeaORM DbErr using typed driver codes when present. |
pub fn plugin_error_from_engine(err: impl Display) -> PluginError
Maps an engine / library failure onto a structured PluginError.
err- Display ofDbErr,LibraryError, or a guest string.
pub fn plugin_error_from_db_err(err: &DbErr) -> PluginError
Maps a SeaORM DbErr using typed driver codes when present.
PostgreSQL SQLSTATE comes from sqlx::DatabaseError::code(). SQLite
guests format SQLITE_* into DbErr::Custom before this mapper runs.
Generated from crates/bookclerk-plugin-sdk at main · View as Markdown