Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sequencer): provide context in checktx response log (#1506)
## Summary We were using `e.to_string` to provide error messages in `CheckTx` responses. This results in dropping the context that the error objects carry around, only providing the top level error. This uses `anyhow`'s `format!("{e:#}")` to format the error with its context. ## Background For example, the following snippet: ```rust use anyhow::anyhow; use astria_eyre::anyhow_to_eyre; fn main() { let _ = astria_eyre::install(); let anyhow_err = anyhow!("anyhow 0").context("anyhow 1"); let combined = anyhow_to_eyre(anyhow_err) .wrap_err("astria eyre 0") .wrap_err("astria eyre 1"); println!("err context: {combined:#}"); } ``` Will produce the following output: ``` err context: {"0": "astria eyre 1", "1": "astria eyre 0", "2": "anyhow 1", "3": "anyhow 0"} ``` ## Changes - changed all instances of `e.to_string()` to `format("{e:#}") in the sequencer's mempool service ## Related Issues Link any issues that are related, prefer full github links. closes #1464
- Loading branch information