Skip to content

Commit

Permalink
feat: error code for un-synced node
Browse files Browse the repository at this point in the history
  • Loading branch information
OmriEshhar1 authored and TzahiTaub committed Nov 19, 2023
1 parent 18cf0f3 commit c2e8092
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
51 changes: 50 additions & 1 deletion api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -92,6 +95,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -129,6 +135,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -181,6 +190,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -323,6 +335,9 @@
},
{
"$ref": "#/components/errors/INVALID_TXN_INDEX"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -408,6 +423,9 @@
},
{
"$ref": "#/components/errors/CLASS_HASH_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -448,6 +466,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -497,6 +518,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -528,6 +552,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -576,6 +603,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -628,6 +658,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -688,6 +721,9 @@
"errors": [
{
"$ref": "#/components/errors/NO_BLOCKS"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -720,6 +756,9 @@
"errors": [
{
"$ref": "#/components/errors/NO_BLOCKS"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -804,6 +843,9 @@
},
{
"$ref": "#/components/errors/TOO_MANY_KEYS_IN_FILTER"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -844,6 +886,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
}
Expand Down Expand Up @@ -3874,6 +3919,10 @@
"code": 34,
"message": "Too many keys provided in a filter"
},
"NODE_NOT_SYNCED": {
"code": 35,
"message": "Node is not synchronized"
},
"CONTRACT_ERROR": {
"code": 40,
"message": "Contract error",
Expand All @@ -3892,4 +3941,4 @@
}
}
}
}
}
12 changes: 11 additions & 1 deletion api/starknet_trace_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -143,6 +146,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/NODE_NOT_SYNCED"
}
]
}
Expand Down Expand Up @@ -500,10 +506,14 @@
"code": 24,
"message": "Block not found"
},
"NODE_NOT_SYNCED": {
"code": 35,
"message": "Node is not synchronized"
},
"CONTRACT_ERROR": {
"code": 40,
"message": "Contract error"
}
}
}
}
}

0 comments on commit c2e8092

Please sign in to comment.