[NOD-461] Fix error code and message in GetTransactionsByAddressHandler. (#499)

This commit is contained in:
stasatdaglabs 2019-11-28 17:32:34 +02:00 committed by Svarog
parent 5e9fc2defc
commit dbf9c09a2e

View File

@ -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()