()
| 11 | type FileSizeError struct{ *errctx.TextError } |
| 12 | |
| 13 | func 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 | |
| 23 | func wrapDownloadError(err error, desc string) error { |
| 24 | return errctx.Wrap( |
no test coverage detected