open-vault/vendor/github.com/michaelklishin/rabbit-hole/error.go
Sam Salisbury b589fbfbd9
ci: switch to go1.12.12 on machine executors (#7703)
* ci: switch to go1.12.12 on machine executors

- This brings in recent ci changes from the release/1.2.x branch.

* go mod vendor

* ci: remove ent build tags

* ci: fix gopath

* go mod vendor

* ci: ensure yarn install

* ci: add debug commands

* ci: debugging

* ci: increment yarn cache; remove debugging

* ci: remove redundant yarn install
2019-11-06 13:15:06 +00:00

15 lines
342 B
Go

package rabbithole
import "fmt"
// ErrorResponse represents an error reported by an API response.
type ErrorResponse struct {
StatusCode int
Message string `json:"error"`
Reason string `json:"reason"`
}
func (rme ErrorResponse) Error() string {
return fmt.Sprintf("Error %d (%s): %s", rme.StatusCode, rme.Message, rme.Reason)
}