From 4bf1b40dbb879b2f7b28511b0adbd0a1ff16e4a0 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Tue, 23 Apr 2024 09:49:16 +0200 Subject: dashboard/app/handler.go: explain throttling rules on 429 --- dashboard/app/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dashboard/app/handler.go') diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index cf9bc9736..f547de6a9 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -139,7 +139,8 @@ func throttleRequest(c context.Context, w http.ResponseWriter, r *http.Request) } func throttlingErrorMessage(c context.Context) string { - ret := "429 Too Many Requests" + ret := fmt.Sprintf("429 Too Many Requests\nAllowed rate is %d requests per %d seconds.", + getConfig(c).Throttle.Limit, int(getConfig(c).Throttle.Window.Seconds())) email := getConfig(c).ContactEmail if email == "" { return ret -- cgit mrf-deployment