Files
imgproxy/semaphores/errors.go
2025-09-05 00:46:25 +06:00

22 lines
437 B
Go

package semaphores
import (
"net/http"
"github.com/imgproxy/imgproxy/v3/ierrors"
)
type TooManyRequestsError struct{}
func newTooManyRequestsError() error {
return ierrors.Wrap(
TooManyRequestsError{},
1,
ierrors.WithStatusCode(http.StatusTooManyRequests),
ierrors.WithPublicMessage("Too many requests"),
ierrors.WithShouldReport(false),
)
}
func (e TooManyRequestsError) Error() string { return "Too many requests" }