Context
We currently log errors through an extension trait on Result<T, E> that adds a log_err method. This has two issues:
- this is verbose and easy to forget,
- the reported module in logs is the
helpers module instead of the module where the error is generated.
Concept
Let’s enable err(Debug) wherever applicable and remove all .log_err() instances.
Note
If needed in some case, Result::inspect_err can be used as well.
Context
We currently log errors through an extension trait on
Result<T, E>that adds alog_errmethod. This has two issues:helpersmodule instead of the module where the error is generated.Concept
Let’s enable
err(Debug)wherever applicable and remove all.log_err()instances.Note
If needed in some case,
Result::inspect_errcan be used as well.