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
Use thiserror for better error handling #6434
Conversation
When you fix the build issue please make sure you squash them into the appropriate commits e.g. you can use |
Please setup the git hooks as described in the CONTRIBUTING.md file. |
For some reason the hook didn't catch that error, had to run the same command as in the test to check. It's fixed now. |
api_client/src/lib.rs
Outdated
Socket(std::io::Error), | ||
#[error("Error writing to or reading from HTTP socket: {0}")] |
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.
I know you copied from the Display
implementation but this error is about sending file descriptors. Please fix as a separate commit.
I think this is lgtm - @likebreath ? |
d092606
to
52b66de
Compare
apologies, added an accidental commit. |
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.
I had a quick pass and it looks good in general. I will need to take a closer look later this week. Let's run the CI workflows first.
Added thiserror crate for Error enums to the api_client package Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
Added thiserror crate for missing files in the arch package Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
Added thiserror for missing files in the qcow module. Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
Updated error enums in device package to use thiserror crate Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
Updated error enums in hypervisor under aarch64 to use thiserror crate Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
Updated error message for the SocketSendFds error to be more descriptive. Signed-off-by: SamrutGadde <samrut.gadde@gmail.com>
52b66de
to
fab6c32
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.
Thanks a lot for the contributions. LGMT.
Apologies for the delay, but I've made the suggested changes as mentioned in a previous pull request (See #6376).
I've added just a few of the commits here to make it easier for review, let me know if you see any changes need to be made.
See #1910