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

fix: throw error when required options is missing #1255

Closed
wants to merge 3 commits into from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Aug 18, 2023

Related to snapshot-labs/score-api#838

When the options.tokenId params is missing, this strategy will just throw a cryptic Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.7.0) exception, caused by BigNumber trying to parse the tokenId which is undefined

This PR will throw a more meaningful error message when tokenId is not set

@wa0x6e wa0x6e requested a review from ChaituVR August 18, 2023 04:24
@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 29, 2023

Issue should be better resolved using schema validation

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Aug 29, 2023

Closing, in favor of using schema for validation

@wa0x6e wa0x6e closed this Aug 29, 2023
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

Successfully merging this pull request may close these issues.

1 participant