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

Function newSanitizeError

processing/svg/errors.go:13–21  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

11)
12
13func newSanitizeError(err error) error {
14 return SanitizeError{errctx.NewWrappedError(
15 err,
16 1,
17 errctx.WithStatusCode(http.StatusUnprocessableEntity),
18 errctx.WithPublicMessage("Broken or unsupported SVG image"),
19 errctx.WithShouldReport(true),
20 )}
21}

Callers 1

sanitizeMethod · 0.85

Calls 4

NewWrappedErrorFunction · 0.92
WithStatusCodeFunction · 0.92
WithPublicMessageFunction · 0.92
WithShouldReportFunction · 0.92

Tested by

no test coverage detected