-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore(provider): migrate providers to ProviderError
#5473
Conversation
ProviderError
ProviderError::NippyJar(err.to_string()) | ||
} | ||
} | ||
|
||
/// Bundled errors variants thrown by various providers. | ||
#[derive(Clone, Debug, Error, PartialEq, Eq)] | ||
pub enum ProviderError { |
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.
since this is the error type for all the provider traits, we should add an Other(box dyn error)
variant so additional errors can be used by implementers
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.
shall we do the String
instead? box dyn will require removing PartialEq
& Eq
which are useful in testing
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 see, let's skip for now, can always change later
Description
Providers must return a
ProviderError
. Otherwise, it is impossible to reuse them in other components without adding a largeRethError
variant.The only other error variant that was ever returned by providers was
SenderRecoveryError
which is now added toProviderError