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

Error "ERR_RITUAL_NOT_FINALIZED" is thrown when the ritual is actually expired #582

Open
3 tasks
manumonti opened this issue Sep 30, 2024 · 0 comments
Open
3 tasks

Comments

@manumonti
Copy link
Member

The problem

If we try to encrypt something using an expired ritual, we will get something similar to:

/Users/manumonti/Projects/nucypher/taco-web/packages/taco/src/dkg.ts:169
      throw new Error(ERR_RITUAL_NOT_FINALIZED(ritualId, ritual));
            ^
Error: Ritual 0 is not finalized. State: 6

But the state number 6 corresponds to an expired ritual.

The suggested solution

  • Rename this error from ERR_RITUAL_NOT_FINALIZED to ERR_RITUAL_NOT_VALID.
  • Change the error description from Ritual ${ritualId} is not finalized. State: ${ritual.state} to Ritual ${ritualId} is not valid. State: ${ritual.state}
  • [Optional] Parse the ritual state to a description: 6 -> EXPIRED, 4-> DKG_INVALID, etc.
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