Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBadRequest ¶
func TryGetHTTPError ¶
TryGetHTTPError returns an error when the http response contains invalid status code.
Types ¶
type ErrorWithMessage ¶ added in v4.21.0
type ErrorWithMessage struct {
Message string `json:"message"`
}
ErrorWithMessage struct to hold a single error with a message
type FieldError ¶
type HTTPError ¶
type HTTPError struct {
Code int
Status string
RequestID string
Message string
ErrorCode string
Errors []string
FieldErrors []FieldError
ErrorDescription string
RawBody string
PendingAuthenticationToken string
EmailVerificationID string
}
HTTPError represents an http error.
type ResponseErrors ¶ added in v4.21.0
type ResponseErrors []string
ResponseErrors is a custom type that can handle unmarshaling []string or []ErrorWithMessage
func (*ResponseErrors) UnmarshalJSON ¶ added in v4.21.0
func (e *ResponseErrors) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.