Using anyhow to handle errors in my Rust changelog builder

May 01, 2026 [Programming, Rust, Tech, Videos]

Let's fix our messy error handling in our Rust towncrier clone by using the anyhow library and adding context() calls to describe what went wrong. Can we match the output of towncrier in different circumstances? Do we actually want to match it exactly, or can we do better?

You can find the code at https://codeberg.org/andybalaam/changelog-builder

Follow me on mastodon: @andybalaam@mastodon.social