Skip to content

Commit

Permalink
add unsupported media type to register validators endpoint
Browse files Browse the repository at this point in the history
Looking at the SSZ support for register validators, we did already support SSZ, but we didnt have the 415 return code so added that in.

fixes #9158

Signed-off-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
rolfyone committed Feb 24, 2025
1 parent a73a1a5 commit 9866096
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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 9866096

Please sign in to comment.