From dbf9c09a2ef55ee2a5bf0b489c9b782b50c582d0 Mon Sep 17 00:00:00 2001 From: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com> Date: Thu, 28 Nov 2019 17:32:34 +0200 Subject: [PATCH] [NOD-461] Fix error code and message in GetTransactionsByAddressHandler. (#499) --- apiserver/controllers/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/controllers/transaction.go b/apiserver/controllers/transaction.go index 73b07c0bc..e7ba16d54 100644 --- a/apiserver/controllers/transaction.go +++ b/apiserver/controllers/transaction.go @@ -80,8 +80,8 @@ func GetTransactionByHashHandler(txHash string) (interface{}, error) { // where the given address is either an input or an output. func GetTransactionsByAddressHandler(address string, skip uint64, limit uint64) (interface{}, error) { if limit > maxGetTransactionsLimit { - return nil, httpserverutils.NewHandlerError(http.StatusUnprocessableEntity, - errors.Errorf("The maximum allowed value for the limit is %d", maxGetTransactionsLimit)) + return nil, httpserverutils.NewHandlerError(http.StatusBadRequest, + errors.Errorf("Limit higher than %d or lower than 0 was requested.", maxGetTransactionsLimit)) } db, err := database.DB()