MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / newTooManyRedirectsError

Function newTooManyRedirectsError

fetcher/errors.go:105–113  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

103}
104
105func newTooManyRedirectsError(n int) error {
106 return TooManyRedirectsError{errctx.NewTextError(
107 fmt.Sprintf("stopped after %d redirects", n),
108 1,
109 errctx.WithStatusCode(http.StatusNotFound),
110 errctx.WithPublicMessage(msgSourceIsUnreachable),
111 errctx.WithShouldReport(false),
112 )}
113}
114
115func newRequestCanceledError(err error) error {
116 return RequestCanceledError{errctx.NewWrappedError(

Callers 1

checkRedirectMethod · 0.85

Calls 4

NewTextErrorFunction · 0.92
WithStatusCodeFunction · 0.92
WithPublicMessageFunction · 0.92
WithShouldReportFunction · 0.92

Tested by

no test coverage detected