Skip to content

Commit

Permalink
feat: error code for un-synced server
Browse files Browse the repository at this point in the history
  • Loading branch information
OmriEshhar1 committed Sep 14, 2023
1 parent cddef47 commit 6edd566
Show file tree
Hide file tree
Showing 2 changed files with 64 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/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -92,6 +95,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -129,6 +135,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -181,6 +190,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -282,6 +294,9 @@
},
{
"$ref": "#/components/errors/INVALID_TXN_INDEX"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -367,6 +382,9 @@
},
{
"$ref": "#/components/errors/CLASS_HASH_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -407,6 +425,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -456,6 +477,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -487,6 +511,9 @@
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -535,6 +562,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -587,6 +617,9 @@
},
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -647,6 +680,9 @@
"errors": [
{
"$ref": "#/components/errors/NO_BLOCKS"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -679,6 +715,9 @@
"errors": [
{
"$ref": "#/components/errors/NO_BLOCKS"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -794,6 +833,9 @@
},
{
"$ref": "#/components/errors/TOO_MANY_KEYS_IN_FILTER"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -834,6 +876,9 @@
},
{
"$ref": "#/components/errors/CONTRACT_NOT_FOUND"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
}
Expand Down Expand Up @@ -3594,10 +3639,14 @@
"code": 34,
"message": "Too many keys provided in a filter"
},
"SERVER_NOT_SYNCED": {
"code": 35,
"message": "Server is not synchronized"
},
"CONTRACT_ERROR": {
"code": 40,
"message": "Contract error"
}
}
}
}
}
15 changes: 14 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/SERVER_NOT_SYNCED"
}
]
},
Expand Down Expand Up @@ -141,8 +144,14 @@
}
},
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
},
{
"$ref": "#/components/errors/INVALID_BLOCK_HASH"
},
{
"$ref": "#/components/errors/SERVER_NOT_SYNCED"
}
]
}
Expand Down Expand Up @@ -472,10 +481,14 @@
"code": 26,
"message": "Invalid block hash"
},
"SERVER_NOT_SYNCED": {
"code": 35,
"message": "Server is not synchronized"
},
"CONTRACT_ERROR": {
"code": 40,
"message": "Contract error"
}
}
}
}
}

0 comments on commit 6edd566

Please sign in to comment.