How to combine anyhow and rocket

I was trying different error handling crates recently: From error-chain over quick-error to anyhow/thiserror. I prefer the latter for being least intrusive and most lightweight.
But I need to handle the errors in a rocket responder. anyhow does not create your own type. So it is not possible to derive the Responder trait from rocket.
What is the best way to have a custom responder while using anyhow?

Maybe raise this issue at the Anyhow issue tracker? I'd think that probably for this use case, you'd want to use thiserror in combination with Anyhow instead of using only Anyhow.

1 Like