1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-12-23 22:11:10 +02:00
Files
imgproxy/workers/errors.go

22 lines
434 B
Go
Raw Permalink Normal View History

package workers
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" }