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

Function newOptionArgumentError

options/parser/errors.go:55–69  ·  view source on GitHub ↗
(ctx context.Context, key, format string, args ...any)

Source from the content-addressed store, hash-verified

53}
54
55func newOptionArgumentError(ctx context.Context, key, format string, args ...any) error {
56 url := errctx.DocsBaseURL(ctx, defaultDocsUrl)
57 if key != "" {
58 url = url + "#" + errorKey(key)
59 }
60
61 return OptionArgumentError{errctx.NewTextError(
62 fmt.Sprintf(format, args...),
63 1,
64 errctx.WithStatusCode(http.StatusNotFound),
65 errctx.WithPublicMessage("Invalid URL"),
66 errctx.WithDocsURL(url),
67 errctx.WithShouldReport(false),
68 )}
69}
70
71func newSecurityOptionsError(ctx context.Context) error {
72 return SecurityOptionsError{errctx.NewTextError(

Callers 7

applyRotateOptionMethod · 0.85
applyExpiresOptionMethod · 0.85
applyPresetOptionMethod · 0.85
newInvalidArgsErrorFunction · 0.85
newInvalidArgumentErrorFunction · 0.85

Calls 7

DocsBaseURLFunction · 0.92
NewTextErrorFunction · 0.92
WithStatusCodeFunction · 0.92
WithPublicMessageFunction · 0.92
WithDocsURLFunction · 0.92
WithShouldReportFunction · 0.92
errorKeyFunction · 0.85

Tested by

no test coverage detected