Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorWithCode ¶
Types ¶
type Code ¶
type Code string
Code is useful for converting to HTTP status code. In general it's a value which is machine readable.
type Error ¶
Error represents API error. All fields (except of wrapped error and message) are meant to be publicly sharable.
func NewPublicError ¶
func (*Error) WithPublicMessage ¶
type ResponseError ¶
type ResponseError struct {
model.BaseResponse
// An HTTP status code for unsuccessful requests.
StatusCode int
}
ResponseError represents an API response with an error status code.
func AsResponseError ¶
func AsResponseError(obj any) (*ResponseError, bool)
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
Error returns the details of an error response.
Click to show internal directories.
Click to hide internal directories.