Error handling
The SDK returns errors in the following format.
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
Description string `json:"description"`
UserFriendlyMessage string `json:"user_friendly_message"`
}
The following table describes the possible error types.
Error Type | Description |
---|---|
|
An error returned by the server |
|
An error returned by the network |
|
An error returned by the HTTP client |
|
An error returned by the SDK configuration |
|
An error returned by the SDK when input is invalid |
|
An error error returned by the SDK when authentication fails |