pub fn is_unique_violation(error: &Error) -> bool
Whether an error is a violated unique constraint, which a service usually reports as 409 rather than 500.
409
500