Hats-Protocol / Hats-Protocol/modules-sdk

Surface errors from Hats.sol

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

The sdk is passing back fuzzy errors from Hats.sol custom errors. Would be great if we can pass back more specific errors here.

Example

`signAgreementAndClaimHat` with a user that hasn't signed but is wearing (edge case) isn't bubbling up the specific hats error but throwing a generic error

1. create hat with agreement eligibility and existing wearer
2. attempt to sign and claim with sdk
3. Error ~ `ModuleFunctionRevertedError: Error: function reverted error name`
- Actual error is `AlreadyWearer` from `Hats.sol`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.