Unable to catch error when using alchemy web3. Works for regular web3
elie222 opened this issue · 3 comments
elie222 commented
We fetch auctions but the smart contract throws an error when the auction doesn't exist.
We don't mind about that and just want to skip the error.
This line works for web3 but shows an Unhandled Promise error when using this library:
return await salesInstance.methods.getAuction(id).call().catch(err => null)
Alasano commented
I have to remember to always check issues on Github before I pull my hair out. 💡
Same issue, just switched to regular web3 and it resolved it.
In my case it's with contract.methods.METHOD.call()
brg8 commented
brg8 commented
Closing for now, feel free to submit new reports and I will re-open to investigate. Thanks!