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 geöffnet am 19. März 2025
Repository-Metriken
- Stars
- (16.704 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 17h 29m) (995 gemergte PRs in 30 T)
Beschreibung
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.