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" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses429TooManyRequests ErrorType = "https://docs.withorb.com/reference/error-responses#429-too-many-requests" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses413ResourceTooLarge ErrorType = "https://docs.withorb.com/reference/error-responses#413-resource-too-large" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses413RequestTooLarge ErrorType = "https://docs.withorb.com/reference/error-responses#413-request-too-large" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses409ResourceConflict ErrorType = "https://docs.withorb.com/reference/error-responses#409-resource-conflict" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses404URLNotFound ErrorType = "https://docs.withorb.com/reference/error-responses#404-url-not-found" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses404ResourceNotFound ErrorType = "https://docs.withorb.com/reference/error-responses#404-resource-not-found" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses404FeatureNotAvailable ErrorType = "https://docs.withorb.com/reference/error-responses#404-feature-not-available" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses401AuthenticationError ErrorType = "https://docs.withorb.com/reference/error-responses#401-authentication-error" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses400RequestValidationErrors ErrorType = "https://docs.withorb.com/reference/error-responses#400-request-validation-errors" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses400DuplicateResourceCreation ErrorType = "https://docs.withorb.com/reference/error-responses#400-duplicate-resource-creation" ErrorTypeHTTPSDocsWithorbComReferenceErrorResponses400ConstraintViolation ErrorType = "https://docs.withorb.com/reference/error-responses#400-constraint-violation" )
Click to show internal directories.
Click to hide internal directories.