Skip to main content

db_error

Function db_error 

Source
pub fn db_error(e: DbErr) -> Error
Expand description

Map any sea-orm error to a stable JC code without leaking internals; the underlying detail goes to stderr for the operator. Unique-key violations are the client’s fault (a re-POSTed id), not a server fault — they map to 409 JC0409 so duplicate writes can’t pollute 5xx alerting.