Skip to content

Commit

Permalink
add unsupported media type to register validators endpoint (#9160)
Browse files Browse the repository at this point in the history
add unsupported media type to register validators endpoint

fixes #9158

Signed-off-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
rolfyone authored Feb 24, 2025
1 parent a73a1a5 commit 15e21ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
- Added Chiado Electra configuration due at Mar-06-2025 09:43:40 GMT+0000

### Bug Fixes
- added 415 response code for beacon-api `/eth/v1/validator/register_validator`.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
}
}
},
"415" : {
"description" : "Unsupported media type",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/HttpErrorResponse"
}
}
}
},
"503" : {
"description" : "Service unavailable",
"content" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public PostRegisterValidator(final ValidatorDataProvider validatorDataProvider)
SIGNED_VALIDATOR_REGISTRATIONS_SCHEMA.getJsonTypeDefinition(),
SIGNED_VALIDATOR_REGISTRATIONS_SCHEMA::sszDeserialize)
.response(SC_OK, "Registration information has been received.")
.withUnsupportedMediaTypeResponse()
.withBadRequestResponse(
Optional.of(
"The request could not be processed, check the response for more information."))
Expand Down

0 comments on commit 15e21ca

Please sign in to comment.