forked from TrueCloudLab/neoneo-go
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:
parent
3b29720298
commit
d3fe92de14
1 changed files with 0 additions and 2 deletions
|
@ -44,8 +44,6 @@ func getHTTPCodeForError(respErr *neorpc.Error) int {
|
||||||
switch respErr.Code {
|
switch respErr.Code {
|
||||||
case neorpc.BadRequestCode:
|
case neorpc.BadRequestCode:
|
||||||
httpCode = http.StatusBadRequest
|
httpCode = http.StatusBadRequest
|
||||||
case neorpc.InvalidRequestCode, neorpc.InvalidParamsCode:
|
|
||||||
httpCode = http.StatusUnprocessableEntity
|
|
||||||
case neorpc.MethodNotFoundCode:
|
case neorpc.MethodNotFoundCode:
|
||||||
httpCode = http.StatusMethodNotAllowed
|
httpCode = http.StatusMethodNotAllowed
|
||||||
case neorpc.InternalServerErrorCode:
|
case neorpc.InternalServerErrorCode:
|
||||||
|
|
Loading…
Reference in a new issue