(err error)
| 37 | } |
| 38 | |
| 39 | func mailInputStatError(err error) error { |
| 40 | if err == nil { |
| 41 | return nil |
| 42 | } |
| 43 | if errors.Is(err, fileio.ErrPathValidation) { |
| 44 | return mailValidationError("unsafe file path: %s", err).WithCause(err) |
| 45 | } |
| 46 | return mailValidationError("cannot read file: %s", err).WithCause(err) |
| 47 | } |
| 48 | |
| 49 | func mailDecorateProblemMessage(err error, format string, args ...any) error { |
| 50 | if err == nil { |