()
| 88 | } |
| 89 | |
| 90 | func (e *NewAPIError) Error() string { |
| 91 | if e == nil { |
| 92 | return "" |
| 93 | } |
| 94 | if e.Err == nil { |
| 95 | // fallback message when underlying error is missing |
| 96 | return string(e.errorCode) |
| 97 | } |
| 98 | return e.Err.Error() |
| 99 | } |
| 100 | |
| 101 | func (e *NewAPIError) SetMessage(message string) { |
| 102 | e.Err = errors.New(message) |
no outgoing calls