-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add thiserror to sozu-command-lib #966
Conversation
This is to solve this issue: |
971e759
to
7ce7b86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋 , I started the review, but I do not want to create a lot of comments.
Could we avoid to
- Create items on error that ends with
Error
, it is redundant (akaChannerError::FooError
) - Have generic message error like
IoError(std::io::Error)
and with a message likeread error
- Create redendundant entries like (ClusterNotFound, ListenerNotFound and so on..), but instead have an error like
NotFound { kind: AnEnum, id: String }
43acc07
to
4120ee9
Compare
thanks @FlorentinDUBOIS , I removed all |
4120ee9
to
f3f4545
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice works ! There are some stuffs to do, but we are quite close to merge it.
57ed70e
to
2ff0385
Compare
this is ready for review BTW |
create function Channel::read_and_parse_from_front_buffer
2ff0385
to
cc341e3
Compare
Using anyhow in Sōzu has proven valuable to concatenate context accross function, and display the whole context all in one line for optimal readability.
This readability is only an advantage to humans, though.
We aim to make errors more usable for machines, with proper error enums to be pattern-matched and so on.