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

Function newUnknownOptionError

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

Source from the content-addressed store, hash-verified

31}
32
33func newUnknownOptionError(ctx context.Context, kind, opt string) error {
34 return UnknownOptionError{errctx.NewTextError(
35 fmt.Sprintf("Unknown %s option %s", kind, opt),
36 1,
37 errctx.WithStatusCode(http.StatusNotFound),
38 errctx.WithPublicMessage("Invalid URL"),
39 errctx.WithDocsURL(errctx.DocsBaseURL(ctx, defaultDocsUrl)),
40 errctx.WithShouldReport(false),
41 )}
42}
43
44func newForbiddenOptionError(ctx context.Context, kind, opt string) error {
45 return ForbiddenOptionError{errctx.NewTextError(

Callers 1

applyURLOptionMethod · 0.85

Calls 6

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

Tested by

no test coverage detected