Skip to content

Commit

Permalink
fix: error message
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 committed Jul 18, 2024
1 parent 8ba0beb commit bef0c27
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions restapi/handlers/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,7 @@ func HandleGetBlockByNumber() func(params block.GetBlockByNumberParams) middlewa
case "latest":
blockNum, err = service.BlockSvc.GetLatestVerifiedBlockNumber()
if err != nil {
return block.NewGetBlockByNumberOK().WithPayload(
&models.GetBlockByNumberRPCResponse{
ID: rpcRequest.ID,
Jsonrpc: rpcRequest.Jsonrpc,
Error: &models.RPCError{
Code: -32602,
Message: "invalid argument",
},
},
)
return block.NewGetBlockByNumberInternalServerError().WithPayload(service.InternalErrorWithError(err))
}
default:
blockNum, err = util.HexToUint64(rpcRequest.Params[0])
Expand Down

0 comments on commit bef0c27

Please sign in to comment.