rpcsrv: remove default request HTTP codes from switch statement

No functional changes, just a refactoring.

Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
This commit is contained in:
Tatiana Nesterenko 2023-08-14 18:03:07 +01:00
parent 3b29720298
commit d3fe92de14

View file

@ -44,8 +44,6 @@ func getHTTPCodeForError(respErr *neorpc.Error) int {
switch respErr.Code {
case neorpc.BadRequestCode:
httpCode = http.StatusBadRequest
case neorpc.InvalidRequestCode, neorpc.InvalidParamsCode:
httpCode = http.StatusUnprocessableEntity
case neorpc.MethodNotFoundCode:
httpCode = http.StatusMethodNotAllowed
case neorpc.InternalServerErrorCode: