-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
What was wrong?
Many nodes/networks return error data in different formats that doesn't comply with the JSON-RPC error spec. raise_contract_logic_error_on_revert attempts to parse the errors, and is getting unwieldy. It returns unexpected errors when parsing fails.
How can it be fixed?
One option is to check if the error returned matches the JSON-RPC error spec. If it does, parse the error and return the parsed message. If we go this route, I think we should still keep the data attribute on ContractLogicError so that users can pass along the raw data to other contracts if they'd like. If the response doesn't match the spec, we'd return some message that indicates that we can't parse it, along with the raw error data. I'm also open to other ideas.
Metadata
Metadata
Assignees
Labels
No labels