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

Function newTypeDetectionError

imagetype/errors.go:14–23  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

12)
13
14func newTypeDetectionError(err error) error {
15 return TypeDetectionError{errctx.NewWrappedError(
16 err,
17 1,
18 errctx.WithPrefix("failed to detect image type"),
19 errctx.WithStatusCode(http.StatusUnprocessableEntity),
20 errctx.WithPublicMessage("Failed to detect source image type"),
21 errctx.WithShouldReport(false),
22 )}
23}
24
25func newUnknownFormatError() error {
26 return UnknownFormatError{errctx.NewTextError(

Callers 1

DetectMethod · 0.85

Calls 5

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

Tested by

no test coverage detected