From f8207e33a21db65bff9585e7a1aa0f144f1a1ae7 Mon Sep 17 00:00:00 2001 From: Alexander Marshalov <_@marshalov.org> Date: Fri, 16 Feb 2024 15:24:59 +0100 Subject: [PATCH] lib/httputils: fixed error message for getting zero duration (#5795) (#5812) --- lib/httputils/duration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httputils/duration.go b/lib/httputils/duration.go index 4fdd05c4a..8a5e3887f 100644 --- a/lib/httputils/duration.go +++ b/lib/httputils/duration.go @@ -29,7 +29,7 @@ func GetDuration(r *http.Request, argKey string, defaultValue int64) (int64, err } msecs := int64(secs * 1e3) if msecs <= 0 || msecs > maxDurationMsecs { - return 0, fmt.Errorf("%q=%dms is out of allowed range [%d ... %d]", argKey, msecs, 0, int64(maxDurationMsecs)) + return 0, fmt.Errorf("%q=%dms is out of allowed range [%d ... %d]", argKey, msecs, 1, int64(maxDurationMsecs)) } return msecs, nil }