Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InternalAPIError APIError = APIError{ Message: "Internal Server Error", Code: "internal_error", } MissingFieldError FieldErrors = FieldErrors{ APIError{ Message: "This field is required.", Code: "required", }} )
Functions ¶
This section is empty.
Types ¶
type FieldErrors ¶
type FieldErrors []APIError
func SingleFieldError ¶
func SingleFieldError(message, code string) FieldErrors
type RequestError ¶
type RequestError struct { Message string `json:"message"` Code string `json:"status"` Errors map[string]FieldErrors `json:"errors,omitempty"` }
RequestError is returned when the API has errors not associated with the request content
Click to show internal directories.
Click to hide internal directories.