From a15b78c334f73a1016bdb73f5a5eaa378884f154 Mon Sep 17 00:00:00 2001 From: Leo Valais Date: Fri, 10 Jan 2025 14:03:52 +0100 Subject: [PATCH] fixup! editoast: define Model error type and use it in trait Delete Signed-off-by: Leo Valais --- editoast/editoast_models/src/model.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editoast/editoast_models/src/model.rs b/editoast/editoast_models/src/model.rs index 1ba087c9196..8b9638d6400 100644 --- a/editoast/editoast_models/src/model.rs +++ b/editoast/editoast_models/src/model.rs @@ -31,6 +31,7 @@ impl From for Error { constraint: captures.get(1).unwrap().as_str().to_string(), } } else { + // falling back to the generic error — since it's still semantically correct, logging the error is enough tracing::error!(?RE, %e, "failed to parse PostgreSQL error message"); Self::DatabaseError(e.into()) } @@ -48,6 +49,7 @@ impl From for Error { constraint: captures.get(2).unwrap().as_str().to_string(), } } else { + // falling back to the generic error — since it's still semantically correct, logging the error is enough tracing::error!(?RE, %e, "failed to parse PostgreSQL error message"); Self::DatabaseError(e.into()) }