diff --git a/internal/server/middleware.go b/internal/server/middleware.go index 414c9577..5bd44de2 100644 --- a/internal/server/middleware.go +++ b/internal/server/middleware.go @@ -73,7 +73,7 @@ func (l *Limiter) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.Ha func (l *Limiter) limitByKey(w http.ResponseWriter, key string) bool { if _, ttl, err := l.cache.GetWithTTL(key); err == nil { - errMsg := fmt.Sprintf("You have exceeded the rate limit. Please wait %s before you try again", ttl.Round(time.Second)) + errMsg := fmt.Sprintf("You have exceeded the rate limit. Please wait %v days before you try again", ttl.Round(time.Hour).Hours()/24) renderJSON(w, claimResponse{Message: errMsg}, http.StatusTooManyRequests) return true }