[NOD-457] Fix error message (#486)

This commit is contained in:
Dan Aharoni 2019-11-24 15:50:15 +02:00 committed by stasatdaglabs
parent 8cbc6670cc
commit 9a1c2e2641

View File

@ -55,7 +55,7 @@ func GetBlockByHashHandler(blockHash string) (interface{}, error) {
// GetBlocksHandler searches for all blocks
func GetBlocksHandler(order string, skip uint64, limit uint64) (interface{}, error) {
if limit > maxGetBlocksLimit {
return nil, httpserverutils.NewHandlerError(http.StatusUnprocessableEntity, errors.Errorf("The maximum allowed value for the limit is %d", maxGetTransactionsLimit))
return nil, httpserverutils.NewHandlerError(http.StatusUnprocessableEntity, errors.Errorf("The maximum allowed value for the limit is %d", maxGetBlocksLimit))
}
blocks := []*dbmodels.Block{}
db, err := database.DB()