()
| 29 | } |
| 30 | |
| 31 | func (e APIError) Error() string { |
| 32 | cause := "" |
| 33 | if e.Cause != nil { |
| 34 | cause = e.Cause.Error() |
| 35 | } |
| 36 | return fmt.Sprintf("%s\n%s", e.Message, cause) |
| 37 | } |
| 38 | |
| 39 | // StackedError contains multiple lines of error messages as well as the stack trace. |
| 40 | type StackedError struct { |