Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Status ErrorStatus `json:"status,required"` Title string `json:"title,required,nullable"` Type ErrorType `json:"type,required"` ValidationErrors []interface{} `json:"validation_errors,required"` Detail string `json:"detail,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 ErrorStatus ¶
type ErrorStatus int64
const ( ErrorStatus500 ErrorStatus = 500 ErrorStatus429 ErrorStatus = 429 ErrorStatus413 ErrorStatus = 413 ErrorStatus409 ErrorStatus = 409 ErrorStatus404 ErrorStatus = 404 ErrorStatus400 ErrorStatus = 400 ErrorStatus401 ErrorStatus = 401 )
func (ErrorStatus) IsKnown ¶ added in v0.24.0
func (r ErrorStatus) IsKnown() bool
type ErrorType ¶
type ErrorType string
const ( ErrorTypeOrbInternalServerError ErrorType = "https://docs.withorb.com/reference/error-responses#500-internal-server-error" ErrorTypeTooManyRequests ErrorType = "https://docs.withorb.com/reference/error-responses#429-too-many-requests" ErrorTypeResourceTooLarge ErrorType = "https://docs.withorb.com/reference/error-responses#413-resource-too-large" ErrorTypeRequestTooLarge ErrorType = "https://docs.withorb.com/reference/error-responses#413-request-too-large" ErrorTypeResourceConflict ErrorType = "https://docs.withorb.com/reference/error-responses#409-resource-conflict" ErrorTypeURLNotFound ErrorType = "https://docs.withorb.com/reference/error-responses#404-url-not-found" ErrorTypeResourceNotFound ErrorType = "https://docs.withorb.com/reference/error-responses#404-resource-not-found" ErrorTypeFeatureNotAvailable ErrorType = "https://docs.withorb.com/reference/error-responses#404-feature-not-available" ErrorTypeOrbAuthenticationError ErrorType = "https://docs.withorb.com/reference/error-responses#401-authentication-error" ErrorTypeRequestValidationError ErrorType = "https://docs.withorb.com/reference/error-responses#400-request-validation-errors" ErrorTypeDuplicateResourceCreation ErrorType = "https://docs.withorb.com/reference/error-responses#400-duplicate-resource-creation" ErrorTypeConstraintViolation ErrorType = "https://docs.withorb.com/reference/error-responses#400-constraint-violation" )
Click to show internal directories.
Click to hide internal directories.