()
| 121 | } |
| 122 | |
| 123 | func (e *NewAPIError) Error() string { |
| 124 | if e == nil { |
| 125 | return "" |
| 126 | } |
| 127 | if e.Err == nil { |
| 128 | // fallback message when underlying error is missing |
| 129 | return string(e.errorCode) |
| 130 | } |
| 131 | return e.Err.Error() |
| 132 | } |
| 133 | |
| 134 | func (e *NewAPIError) ErrorWithStatusCode() string { |
| 135 | if e == nil { |
no outgoing calls
no test coverage detected