reclaimprotocol / zk-symmetric-crypto

A circom library for zero-knowledge proofs of symmetric encryption key ownership without key revelation.
6 stars 3 forks source link

Improve error handling in makeLocalGnarkZkOperator function #2

Open adithyaakrishna opened 3 weeks ago

adithyaakrishna commented 3 weeks ago

The makeLocalGnarkZkOperator function in gnark.ts could benefit from improved error handling to provide more informative messages to users.

Tasks:

  1. Replace the generic console.log statement with a more specific error message.
  2. Consider creating a custom error type for Gnark-related errors.
  3. Ensure that the error message includes information about supported platforms.
  4. Add a try-catch block around the initGnark function call to handle potential errors during initialization.
  5. Update the return statement to provide a more informative error when Gnark is not supported.

Improving error handling will help users better understand and troubleshoot issues when working with Gnark in different environments.

Contributors: Please note that by submitting a pull request, you are agreeing to accept and sign the Contributor License Agreement (CLA) found at https://github.com/reclaimprotocol/.github/blob/main/CLA.md

vanshdhar999 commented 1 week ago

Can you assign me this issue to me? Would very much like to work on this problem.