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

Function newImageResolutionError

security/errors.go:41–50  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

39}
40
41func newImageResolutionError(msg string) error {
42 return ImageResolutionError{errctx.NewTextError(
43 msg,
44 1,
45 errctx.WithStatusCode(http.StatusUnprocessableEntity),
46 errctx.WithPublicMessage("Invalid source image"),
47 errctx.WithShouldReport(false),
48 errctx.WithDocsURL("https://docs.imgproxy.net/configuration/options#security"),
49 )}
50}
51
52func newSourceURLError(imageURL string) error {
53 return SourceURLError{errctx.NewTextError(

Callers 1

CheckDimensionsMethod · 0.85

Calls 5

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

Tested by

no test coverage detected