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

Function newForbiddenOptionError

options/parser/errors.go:44–53  ·  view source on GitHub ↗
(ctx context.Context, kind, opt string)

Source from the content-addressed store, hash-verified

42}
43
44func newForbiddenOptionError(ctx context.Context, kind, opt string) error {
45 return ForbiddenOptionError{errctx.NewTextError(
46 fmt.Sprintf("Forbidden %s option %s", kind, opt),
47 1,
48 errctx.WithStatusCode(http.StatusNotFound),
49 errctx.WithPublicMessage("Invalid URL"),
50 errctx.WithShouldReport(false),
51 errctx.WithDocsURL(errctx.DocsBaseURL(ctx, defaultDocsUrl)),
52 )}
53}
54
55func newOptionArgumentError(ctx context.Context, key, format string, args ...any) error {
56 url := errctx.DocsBaseURL(ctx, defaultDocsUrl)

Callers 1

applyURLOptionsMethod · 0.85

Calls 6

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

Tested by

no test coverage detected