We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63fb2d1 + c382cd5 commit f5d4b2aCopy full SHA for f5d4b2a
1 file changed
services/api/src/handlers.rs
@@ -92,7 +92,8 @@ fn into_api_error(err: anyhow::Error) -> ApiError {
92
return ApiError::service_unavailable("database connection pool exhausted");
93
}
94
DbError::ConstraintViolation(msg) => {
95
- return ApiError::conflict(msg.clone());
+ tracing::error!(db_constraint = %msg, "database constraint violation");
96
+ return ApiError::conflict("A record with this value already exists.");
97
98
DbError::Other(_) => {}
99
0 commit comments