You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application heavily rely on std::error::Error::source to propagate the error from the lower components to the top-level component. The top-level component responsible for printing the error and its nested errors. The problem is when I use the same function that I used to print my errors to print the sqlx::Error I got an output with redundant information:
[2024/04/11 13:05][Error]: Failed to log REDACTED: error returned from database: 1146 (42S02): Table 'REDACTED' doesn't exist -> 1146 (42S02): Table 'REDACTED' doesn't exist.
Notice the duplicated 1146 (42S02): Table 'REDACTED' doesn't exist. After checking on the implementation of sqlx::Error what I found is it apply #[source] to the inner error while also print it together with the current error, which causing the duplicated message on the above.
The text was updated successfully, but these errors were encountered:
My application heavily rely on
std::error::Error::source
to propagate the error from the lower components to the top-level component. The top-level component responsible for printing the error and its nested errors. The problem is when I use the same function that I used to print my errors to print thesqlx::Error
I got an output with redundant information:Notice the duplicated
1146 (42S02): Table 'REDACTED' doesn't exist
. After checking on the implementation ofsqlx::Error
what I found is it apply#[source]
to the inner error while also print it together with the current error, which causing the duplicated message on the above.The text was updated successfully, but these errors were encountered: