mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
[NOD-461] Fix error code and message in GetTransactionsByAddressHandler. (#499)
This commit is contained in:
parent
5e9fc2defc
commit
dbf9c09a2e
@ -80,8 +80,8 @@ func GetTransactionByHashHandler(txHash string) (interface{}, error) {
|
|||||||
// where the given address is either an input or an output.
|
// where the given address is either an input or an output.
|
||||||
func GetTransactionsByAddressHandler(address string, skip uint64, limit uint64) (interface{}, error) {
|
func GetTransactionsByAddressHandler(address string, skip uint64, limit uint64) (interface{}, error) {
|
||||||
if limit > maxGetTransactionsLimit {
|
if limit > maxGetTransactionsLimit {
|
||||||
return nil, httpserverutils.NewHandlerError(http.StatusUnprocessableEntity,
|
return nil, httpserverutils.NewHandlerError(http.StatusBadRequest,
|
||||||
errors.Errorf("The maximum allowed value for the limit is %d", maxGetTransactionsLimit))
|
errors.Errorf("Limit higher than %d or lower than 0 was requested.", maxGetTransactionsLimit))
|
||||||
}
|
}
|
||||||
|
|
||||||
db, err := database.DB()
|
db, err := database.DB()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user