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

Improve error messages for retrieval and decryption #76

Open
piotr-roslaniec opened this issue Aug 16, 2022 · 0 comments
Open

Improve error messages for retrieval and decryption #76

piotr-roslaniec opened this issue Aug 16, 2022 · 0 comments

Comments

@piotr-roslaniec
Copy link
Contributor

Currently, if during Bob.retrieveAndDecrypt we fail to retrieve a minimal amount of cFrags, we throw the following error:

Not enough cFrags retrieved to open capsule Capsule:xxxxxxxxxxxxxx. Was the policy revoked?

However, there are many different reasons why this could happen:

  • Policy was revoked
  • Policy was created, but not enacted (see delayed enact flow)
  • Ursulas fail to provide Porter with cFrags

How should we address these scenarios?

  • Policy was revoked
    • Currently not implemented, remove revocation from the error message.
    • In the future, check with the SubscriptionManager contract.
  • Policy was created, but not enacted
    • Check with the SubscriptionManager contract? That would require a web3 provider for Bob.
  • Ursulas fail to provide Porter with enough cFrags
    • Detect this issue early and throw a relevant error.

Ordering of these checks will be significant.

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

No branches or pull requests

1 participant