traefik/vendor/github.com/ovh/go-ovh/ovh/error.go
2017-03-09 13:13:02 +01:00

17 lines
323 B
Go

package ovh
import "fmt"
// APIError represents an error that can occurred while calling the API.
type APIError struct {
// Error message.
Message string
// HTTP code.
Code int
// ID of the request
QueryID string
}
func (err *APIError) Error() string {
return fmt.Sprintf("Error %d: %q", err.Code, err.Message)
}