Skip to content
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

Remove generic UrsaError err mapping, handle possible UrsaErrors explicitly #734

Merged
merged 2 commits into from Jan 13, 2023

Conversation

Patrik-Stas
Copy link
Contributor

@Patrik-Stas Patrik-Stas commented Jan 12, 2023

  • Remove impl From<UrsaCryptoError> for AriesVcxError mapping - it seemed confusing, because it was not clear which of the error conditions can actually / in what circurmstance happen / where are ursa error thrown. In fact, most of the UrsaErrorKinds were never thrown. It turned out there's only 3 places where we deal with Ursa directly, and those errors are always about dealing with BigNumber conversions.
  • So instead of the generic handling covering cases which don't happen, I've handled ursa errors directly on spot and converted them to new error kind UrsaError

Signed-off-by: Patrik Stas patrik.stas@absa.africa

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2023

Codecov Report

Merging #734 (0657ede) into main (4e4f02a) will decrease coverage by 24.32%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main     #734       +/-   ##
===========================================
- Coverage   54.00%   29.68%   -24.33%     
===========================================
  Files         371      368        -3     
  Lines       37656    31423     -6233     
  Branches     8184     6395     -1789     
===========================================
- Hits        20338     9327    -11011     
- Misses      11350    19343     +7993     
+ Partials     5968     2753     -3215     
Flag Coverage Δ
unittests-aries-vcx 29.68% <0.00%> (-24.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aries_vcx/src/errors/error.rs 40.54% <ø> (ø)
aries_vcx/src/plugins/anoncreds/credx_anoncreds.rs 10.30% <0.00%> (-53.79%) ⬇️
...tocols/proof_presentation/prover/states/initial.rs 0.00% <0.00%> (-100.00%) ⬇️
...cols/proof_presentation/verifier/states/initial.rs 0.00% <0.00%> (-100.00%) ⬇️
aries_vcx/src/handlers/discovery/mod.rs 0.00% <0.00%> (-93.94%) ⬇️
aries_vcx/tests/utils/scenarios.rs 0.00% <0.00%> (-80.47%) ⬇️
libvdrtools/src/domain/ledger/request.rs 0.00% <0.00%> (-79.49%) ⬇️
aries_vcx/src/utils/provision.rs 0.00% <0.00%> (-77.78%) ⬇️
...ies_vcx/src/core/profile/modular_wallet_profile.rs 0.00% <0.00%> (-76.48%) ⬇️
aries_vcx/src/plugins/anoncreds/indy_anoncreds.rs 2.70% <0.00%> (-75.68%) ⬇️
... and 207 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

gmulhearn
gmulhearn previously approved these changes Jan 13, 2023
Copy link
Contributor

@gmulhearn gmulhearn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

…icitly

Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
@mirgee mirgee merged commit 94e6e45 into main Jan 13, 2023
@mirgee mirgee deleted the err-handling/ursa-errors branch January 13, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants