Skip to content

Commit 1ea5b2d

Browse files
committed
add error when accessing pruned chain data
1 parent 4008859 commit 1ea5b2d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/eth/block.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
oneOf:
1717
- $ref: '#/components/schemas/notFound'
1818
- $ref: '#/components/schemas/Block'
19+
errors:
20+
- code: 4444
21+
message: Pruned history unavailable
1922
examples:
2023
- name: eth_getBlockByHash example
2124
params:
@@ -76,6 +79,9 @@
7679
oneOf:
7780
- $ref: '#/components/schemas/notFound'
7881
- $ref: '#/components/schemas/Block'
82+
errors:
83+
- code: 4444
84+
message: Pruned history unavailable
7985
examples:
8086
- name: eth_getBlockByNumber example
8187
params:
@@ -131,6 +137,9 @@
131137
- $ref: '#/components/schemas/notFound'
132138
- title: Transaction count
133139
$ref: '#/components/schemas/uint'
140+
errors:
141+
- code: 4444
142+
message: Pruned history unavailable
134143
examples:
135144
- name: eth_getBlockTransactionCountByHash example
136145
params:
@@ -152,6 +161,9 @@
152161
- $ref: '#/components/schemas/notFound'
153162
- title: Transaction count
154163
$ref: '#/components/schemas/uint'
164+
errors:
165+
- code: 4444
166+
message: Pruned history unavailable
155167
examples:
156168
- name: eth_getBlockTransactionCountByNumber example
157169
params:
@@ -173,6 +185,9 @@
173185
- $ref: '#/components/schemas/notFound'
174186
- title: Uncle count
175187
$ref: '#/components/schemas/uint'
188+
errors:
189+
- code: 4444
190+
message: Pruned history unavailable
176191
examples:
177192
- name: eth_getUncleCountByBlockHash example
178193
params:
@@ -194,6 +209,9 @@
194209
- $ref: '#/components/schemas/notFound'
195210
- title: Uncle count
196211
$ref: '#/components/schemas/uint'
212+
errors:
213+
- code: 4444
214+
message: Pruned history unavailable
197215
examples:
198216
- name: eth_getUncleCountByBlockNumber example
199217
params:
@@ -218,6 +236,9 @@
218236
type: array
219237
items:
220238
$ref: '#/components/schemas/ReceiptInfo'
239+
errors:
240+
- code: 4444
241+
message: Pruned history unavailable
221242
examples:
222243
- name: eth_getBlockReceipts example
223244
params:

src/eth/transaction.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
oneOf:
5252
- $ref: '#/components/schemas/notFound'
5353
- $ref: '#/components/schemas/TransactionInfo'
54+
errors:
55+
- code: 4444
56+
message: Pruned history unavailable
5457
examples:
5558
- name: eth_getTransactionByBlockHashAndIndex example
5659
params:
@@ -93,6 +96,9 @@
9396
oneOf:
9497
- $ref: '#/components/schemas/notFound'
9598
- $ref: '#/components/schemas/TransactionInfo'
99+
errors:
100+
- code: 4444
101+
message: Pruned history unavailable
96102
examples:
97103
- name: eth_getTransactionByBlockNumberAndIndex example
98104
params:
@@ -131,6 +137,9 @@
131137
oneOf:
132138
- $ref: '#/components/schemas/notFound'
133139
- $ref: '#/components/schemas/ReceiptInfo'
140+
errors:
141+
- code: 4444
142+
message: Pruned history unavailable
134143
examples:
135144
- name: eth_getTransactionReceipt example
136145
params:

0 commit comments

Comments
 (0)