Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderError ¶
func RenderError(w http.ResponseWriter, r *http.Request, err error)
Types ¶
type APIError ¶
type APIError struct {
RequestID string `json:"request_id"`
ErrorCode string `json:"error_code"`
Message string `json:"message,omitempty"`
StatusCode int `json:"status_code"`
// JSON doesnt marshal Error type; store the error text as a string field
ErrorText string `json:"error"`
}
func InValidRequestError ¶
func TooManyRequestError ¶
func (APIError) IsServiceError ¶
func (APIError) IsUserError ¶
Click to show internal directories.
Click to hide internal directories.