Skip to content

Commit

Permalink
Use HTTP 414 status code for GET maxItems enforcement (#329)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
jshufro and rolfyone authored Jun 21, 2023
1 parent 205bb82 commit e46bd0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apis/beacon/states/validator_balances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ get:
example:
code: 400
message: "Invalid state ID: current"
"414":
description: "Too many validator IDs"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 414
message: "Too many validator IDs in request"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'

9 changes: 9 additions & 0 deletions apis/beacon/states/validators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,14 @@ get:
example:
code: 404
message: "State not found"
"414":
description: "Too many validator IDs"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 414
message: "Too many validator IDs in request"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"

0 comments on commit e46bd0c

Please sign in to comment.