(err error, param string)
| 33 | } |
| 34 | |
| 35 | func withIMValidationParam(err error, param string) error { |
| 36 | if err == nil || param == "" { |
| 37 | return err |
| 38 | } |
| 39 | var ve *errs.ValidationError |
| 40 | if errors.As(err, &ve) && ve.Param == "" { |
| 41 | ve.WithParam(param) |
| 42 | } |
| 43 | return err |
| 44 | } |
| 45 | |
| 46 | // appendIMRecoveryHint attaches a recovery hint to err. A typed error keeps its |
| 47 | // classification (category/subtype/code/log_id); only the hint is appended to |
no test coverage detected