(err *Error)
| 138 | } |
| 139 | |
| 140 | func errorEventBody(err *Error) string { |
| 141 | if err == nil { |
| 142 | return "request failed" |
| 143 | } |
| 144 | if msg := strings.TrimSpace(err.Message); msg != "" { |
| 145 | return msg |
| 146 | } |
| 147 | if msg := strings.TrimSpace(err.Error()); msg != "" { |
| 148 | return msg |
| 149 | } |
| 150 | return "request failed" |
| 151 | } |
| 152 | |
| 153 | func timePtrIfSet(value time.Time) *time.Time { |
| 154 | if value.IsZero() { |
no test coverage detected