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

Function newFileSizeError

imagedata/errors.go:13–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11type FileSizeError struct{ *errctx.TextError }
12
13func newFileSizeError() error {
14 return FileSizeError{errctx.NewTextError(
15 "Source image file is too big",
16 1,
17 errctx.WithStatusCode(http.StatusUnprocessableEntity),
18 errctx.WithPublicMessage("Invalid source image"),
19 errctx.WithShouldReport(false),
20 )}
21}
22
23func wrapDownloadError(err error, desc string) error {
24 return errctx.Wrap(

Callers 2

ReadMethod · 0.85
limitResponseSizeFunction · 0.85

Calls 4

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

Tested by

no test coverage detected