Skip to content

Commit

Permalink
add structed error
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielElp committed Jul 25, 2024
1 parent e5ce8c6 commit 388951c
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@
"execution_status": {
"title": "execution status",
"$ref": "#/components/schemas/TXN_EXECUTION_STATUS"
},
"failure_reason": {
"title": "failure reason",
"description": "the failure reason, only appears if finality_status is REJECTED or execution_status is REVERTED",
"type": "string"
}
},
"required": ["finality_status"]
Expand Down Expand Up @@ -3573,6 +3578,36 @@
"required": ["data_availability"]
}
]
},
"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 @@ -3625,8 +3660,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 @@ -3646,8 +3681,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 388951c

Please sign in to comment.