package qcclient

import "errors"

var (
	ErrUnauthorized = errors.New("qc unauthorized")
	ErrBadRequest   = errors.New("qc bad request")
	ErrNotFound     = errors.New("qc not found")
)

type HTTPError struct {
	StatusCode int
	APIError   *APIError
	RawBody    []byte
}

func (e *HTTPError) Error() string {
	if e.APIError != nil && e.APIError.Message != "" {
		return e.APIError.Message
	}
	return "qc request failed"
}
