Clean up error handling across the board; need to make sure it's consistent everything and consistent with how we were handling errors in Django
#30.174 aberto em 19 de mar. de 2025
Métricas do repositório
- Stars
- (16.704 stars)
- Métricas de merge de PR
- (Mesclagem média 17h 29m) (995 fundiu PRs em 30d)
Description
More context: when I first shipped the feature-flags rust service (at src/rust/feature-flags), I used thiserror for error-handling because I like how you could define typed enums with automatic trait implementations. It was my first time writing a rust application, and it seemed like a cool tool.
I was wrong. I mean, thiserror worked, but it led to a bunch of overkill that I don't really need – a bunch of extra error handling code that doesn't do much but exists to satisfy the compiler. thiserror is great for writing rust libraries, but anyhow is a much better choice for rust applications.
So, this task is to basically port all of the error handling in the feature-flags module to use anyhow instead of thiserror, while still keeping the client interface (i.e. the actual responses the app sends to anyone calling the /flags endpoint) the same.