Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateErrorResponseFromError ¶
CreateErrorResponseFromError creates an ErrorResponse from a generic error.
func DetailsFromError ¶ added in v0.184.48
DetailsFromError returns the details from an error.
func IsErrorResponse ¶ added in v0.182.38
IsErrorResponse determines if an error is an ErrorResponse.
Types ¶
type ErrorCode ¶
type ErrorCode string
ErrorCode represents a specific error code.
const GenericErrorCode ErrorCode = "0"
func ErrorCodeFromError ¶ added in v0.184.48
ErrorCodeFromError returns the ErrorCode from an error.
type ErrorResponse ¶
type ErrorResponse struct { Code ErrorCode `json:"code"` Details string `json:"details,omitempty"` }
ErrorResponse represents an error response structure.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
Error implements the error interface for ErrorResponse.
Click to show internal directories.
Click to hide internal directories.