-
Notifications
You must be signed in to change notification settings - Fork 1
KOL-5 | feat: Enhance error handling with detailed KolmeError variants #403
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
base: main
Are you sure you want to change the base?
Conversation
Deploying kolme with
|
| Latest commit: |
37a5a74
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55360410.kolme.pages.dev |
| Branch Preview URL: | https://kol-5.kolme.pages.dev |
snoyberg
left a comment
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.
Left some comments for a change in general direction. When this is ready for another review, let's get @MichaelNelo on this too so I'm not a bottleneck.
2efdafe to
a75f49d
Compare
|
@borsboom, Michael asked me to work with you in this PR. |
|
@anakinzhed I'm still familiarizing myself with the Kolme codebase, and this is a big PR. I'm working to understand the changes and figure out if there's a way we can avoid the stringy errors that are hard to avoid because of the traits that KolmeError derives. It might take me a little while to respond further, but I am working on it. |
borsboom
left a comment
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.
Not easy to retrofit proper errors into a codebase like this, especially given the need for some errors to be serializable.
Aside from the comments I added to specific changes, I noticed there are still many uses of anyhow::Result which end up being "hidden" by error types implementing From<anyhow::Error> and stringifying them. Removing those, and any imports of anyhow::Result should help find them (as well as just searching the codebase anyhow).
|
@borsboom Sorry for the delay. I believe I’ve addressed all of your comments. Please take a look. |
|
Great progress! I notice there are still some places that are returning Better would be for the functions to return a concrete error (e.g. pub enum KolmeExecuteError {
…
#[error("Public key error: {0}")]
PublicKeyError(#[from] shared::cryptography::PublicKeyError),
}If at all possible, |
No description provided.