Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.
Types ¶
type ErrorResponse ¶
An ErrorResponse reports errors caused by an API request.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
Click to show internal directories.
Click to hide internal directories.