APIError provides the generic API and protocol agnostic error type all SDK generated exception types will implement.
| 5 | // APIError provides the generic API and protocol agnostic error type all SDK |
| 6 | // generated exception types will implement. |
| 7 | type APIError interface { |
| 8 | error |
| 9 | |
| 10 | // ErrorCode returns the error code for the API exception. |
| 11 | ErrorCode() string |
| 12 | // ErrorMessage returns the error message for the API exception. |
| 13 | ErrorMessage() string |
| 14 | // ErrorFault returns the fault for the API exception. |
| 15 | ErrorFault() ErrorFault |
| 16 | } |
| 17 | |
| 18 | // GenericAPIError provides a generic concrete API error type that SDKs can use |
| 19 | // to deserialize error responses into. Should be used for unmodeled or untyped |