You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got the following use-case: I'm implementing SecretKeyTrait::create_signature and it delegates to some other, external service, that can fail. When it does I can't pass the inner error (since the function requires returning rpgp Error).
Currently I'm logging the inner error and returning pgp::errors::Error::InvalidInput which, IMO, is sub-optimal.
It would be good if pgp::errors::Error had a variant that I could use to pass my inner error (e.g. Other(Box<dyn std::error::Error> ...)).
Happy to hear other ideas how to improve this situation, too.
I would recomment to use io errors with the current code, as it allows you to pass at least the string through. but will keep this in mind for the error changes I am planning
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I've got the following use-case: I'm implementing
SecretKeyTrait::create_signature
and it delegates to some other, external service, that can fail. When it does I can't pass the inner error (since the function requires returning rpgp Error).Currently I'm logging the inner error and returning
pgp::errors::Error::InvalidInput
which, IMO, is sub-optimal.It would be good if
pgp::errors::Error
had a variant that I could use to pass my inner error (e.g.Other(Box<dyn std::error::Error> ...)
).Happy to hear other ideas how to improve this situation, too.
(The code in question: https://gitlab.archlinux.org/archlinux/signstar/-/merge_requests/201/diffs#a73b577f60b6887045b9ec7e75ca81952686414f_577_581)
Thanks!
The text was updated successfully, but these errors were encountered: