ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
584 stars 468 forks source link

Refactoring error handling #915

Open Pauan opened 1 month ago

Pauan commented 1 month ago

Motivation

Currently the APIs sometimes throw errors, and sometimes return an Error object.

In JavaScript it is idiomatic to always throw errors, so this PR refactors the existing error handling.

This is a breaking change, so it would be good to release this at the same time as mainnet.

Pauan commented 2 weeks ago

@iamalwaysuncomfortable @jaketarnow Just a friendly reminder that this is ready for review.