Return bad limit in error

This commit is contained in:
Neil Alexander 2020-04-16 17:57:39 +01:00
parent b813116846
commit a0ce6003fc

View file

@ -16,6 +16,7 @@ package routing
import (
"encoding/json"
"fmt"
"net/http"
"strconv"
"time"
@ -75,7 +76,7 @@ func Backfill(
util.GetLogger(httpReq.Context()).WithError(err).Error("strconv.Atoi failed")
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.InvalidArgumentValue("limit is invalid format"),
JSON: jsonerror.InvalidArgumentValue(fmt.Sprintf("limit %q is invalid format", limit)),
}
}