(err error, field string)
| 112 | } |
| 113 | |
| 114 | func DecorateWithParamName(err error, field string) error { |
| 115 | errTmpl := "invalid parameter %q; %v" |
| 116 | if status, ok := status.FromError(err); ok { |
| 117 | return httpgrpc.Errorf(int(status.Code()), errTmpl, field, status.Message()) |
| 118 | } |
| 119 | return fmt.Errorf(errTmpl, field, err) |
| 120 | } |
no test coverage detected