From a1396f367953a3983e99da5418c217509d79c6ac Mon Sep 17 00:00:00 2001 From: Bouke van der Bijl Date: Fri, 8 Dec 2023 14:50:57 +0100 Subject: [PATCH] Add source annotations to errors (#1999) --- src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index 1ba430db..f9c054c9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,7 +17,7 @@ use thiserror::Error; pub enum DbErr { /// This error can happen when the connection pool is fully-utilized #[error("Failed to acquire connection from pool: {0}")] - ConnectionAcquire(ConnAcquireErr), + ConnectionAcquire(#[source] ConnAcquireErr), /// Runtime type conversion error #[error("Error converting `{from}` into `{into}`: {source}")] TryIntoErr { @@ -92,7 +92,7 @@ pub enum RuntimeErr { /// SQLx Error #[cfg(feature = "sqlx-dep")] #[error("{0}")] - SqlxError(sqlx::error::Error), + SqlxError(#[source] sqlx::error::Error), /// Error generated from within SeaORM #[error("{0}")] Internal(String),