Skip to content

Commit

Permalink
add structed error
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielElp committed Sep 19, 2024
1 parent 080b9a0 commit e8aad20
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3682,6 +3682,36 @@
"node"
]
}
},
"CONTRACT_EXECUTION_ERROR": {
"description": "structured error that can later be processed by wallets or sdks",
"titel": "contract execution error",
"oneOf": [
{
"type": "object",
"title": "inner call",
"description": "error frame",
"properties": {
"contract_address": {
"$ref": "#/components/schemas/ADDRESS"
},
"class_hash": {
"$ref": "#/components/schemas/FELT"
},
"selector": {
"$ref": "#/components/schemas/FELT"
},
"error": {
"$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR"
}
}
},
{
"title": "error message",
"description": "the error raised during execution",
"type": "string"
}
]
}
},
"errors": {
Expand Down Expand Up @@ -3734,8 +3764,8 @@
"properties": {
"revert_error": {
"title": "revert error",
"description": "a string encoding the execution trace up to the point of failure",
"type": "string"
"description": "the execution trace up to the point of failure",
"$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR"
}
},
"required": "revert_error"
Expand All @@ -3755,8 +3785,8 @@
},
"execution_error": {
"title": "revert error",
"description": "a string encoding the execution trace up to the point of failure",
"type": "string"
"description": "the§ execution trace up to the point of failure",
"$ref": "#/components/schemas/CONTRACT_EXECUTION_ERROR"
}
},
"required": ["transaction_index", "execution_error"]
Expand Down

0 comments on commit e8aad20

Please sign in to comment.