You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately the exception raised with call() method provides no information about triggered custom error and the data passed as the error parameters:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
...
File "/Users/alexander/Desktop/FastAPI/venv/lib/python3.10/site-packages/web3/_utils/method_formatters.py", line 636, in raise_solidity_error_on_revert
raise ContractLogicError(response["error"]["message"])
web3.exceptions.ContractLogicError: execution reverted
If we look at the variable response used to raise the exception, we see that this data is contained in response["error"]["data"]
What was wrong?
I need to call a contract method and get revert data
Unfortunately the exception raised with
call()
method provides no information about triggered custom error and the data passed as the error parameters:If we look at the variable
response
used to raise the exception, we see that this data is contained inresponse["error"]["data"]
But it isn't used in the exception and there is no access to raw response data but there should be a proper way to get it
The text was updated successfully, but these errors were encountered: