diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-04-23 09:49:16 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-04-24 15:17:31 +0000 |
| commit | 4bf1b40dbb879b2f7b28511b0adbd0a1ff16e4a0 (patch) | |
| tree | cecee7d7b9eab7533e5a3fc406ddef678cdfebdb /dashboard | |
| parent | a604cf376325b5f4d5ead8c2ca50da91330c72c8 (diff) | |
dashboard/app/handler.go: explain throttling rules on 429
Diffstat (limited to 'dashboard')
| -rw-r--r-- | dashboard/app/handler.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
