Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Detail string `json:"detail,required,nullable"` // All errors related to parsing the request parameters. Errors []interface{} `json:"errors,required"` Reason ErrorReason `json:"reason,required"` ResourceID string `json:"resource_id,required"` Status ErrorStatus `json:"status,required"` Title string `json:"title,required"` Type ErrorType `json:"type,required"` RetryAfter int64 `json:"retry_after,nullable"` JSON errorJSON `json:"-"` StatusCode int Request *http.Request Response *http.Response }
Error represents an error that originates from the API, i.e. when a request is made and the API returns a response with a HTTP status code. Other errors are not wrapped by this SDK.
func (*Error) DumpRequest ¶
func (*Error) DumpResponse ¶
func (*Error) UnmarshalJSON ¶
type ErrorReason ¶
type ErrorReason string
const ( // deleted_credential ErrorReasonDeletedCredential ErrorReason = "deleted_credential" // expired_credential ErrorReasonExpiredCredential ErrorReason = "expired_credential" // no_credential ErrorReasonNoCredential ErrorReason = "no_credential" // no_header ErrorReasonNoHeader ErrorReason = "no_header" // wrong_environment ErrorReasonWrongEnvironment ErrorReason = "wrong_environment" )
func (ErrorReason) IsKnown ¶
func (r ErrorReason) IsKnown() bool
type ErrorStatus ¶
type ErrorStatus int64
const ( ErrorStatus429 ErrorStatus = 429 ErrorStatus403 ErrorStatus = 403 ErrorStatus404 ErrorStatus = 404 ErrorStatus400 ErrorStatus = 400 ErrorStatus409 ErrorStatus = 409 ErrorStatus401 ErrorStatus = 401 ErrorStatus500 ErrorStatus = 500 )
func (ErrorStatus) IsKnown ¶
func (r ErrorStatus) IsKnown() bool
type ErrorType ¶
type ErrorType string
const ( ErrorTypeRateLimitedError ErrorType = "rate_limited_error" ErrorTypePrivateFeatureError ErrorType = "private_feature_error" ErrorTypeObjectNotFoundError ErrorType = "object_not_found_error" ErrorTypeMalformedRequestError ErrorType = "malformed_request_error" ErrorTypeInvalidParametersError ErrorType = "invalid_parameters_error" ErrorTypeInvalidOperationError ErrorType = "invalid_operation_error" ErrorTypeInvalidAPIKeyError ErrorType = "invalid_api_key_error" ErrorTypeInternalServerError ErrorType = "internal_server_error" ErrorTypeInsufficientPermissionsError ErrorType = "insufficient_permissions_error" ErrorTypeIdempotencyKeyAlreadyUsedError ErrorType = "idempotency_key_already_used_error" ErrorTypeEnvironmentMismatchError ErrorType = "environment_mismatch_error" ErrorTypeAPIMethodNotFoundError ErrorType = "api_method_not_found_error" )
Click to show internal directories.
Click to hide internal directories.