1package rabbithole
2
3import "fmt"
4
5// ErrorResponse represents an error reported by an API response.
6type ErrorResponse struct {
7	StatusCode int
8	Message    string `json:"error"`
9	Reason     string `json:"reason"`
10}
11
12func (rme ErrorResponse) Error() string {
13	return fmt.Sprintf("Error %d (%s): %s", rme.StatusCode, rme.Message, rme.Reason)
14}
15