func (e *StatusError) Status() unversioned.Status {
	return e.ErrStatus
}
Status allows access to e's status without having to know the detailed workings
of StatusError. Used by pkg/apiserver.
package errors
import (
	"encoding/json"
	"fmt"
	"net/http"
	"strings"
	"k8s.io/client-go/pkg/api/unversioned"
	"k8s.io/client-go/pkg/runtime"
	"k8s.io/client-go/pkg/util/validation/field"
)
const (
	StatusUnprocessableEntity = 422
	StatusTooManyRequests     = 429
	StatusServerTimeout = 504
)
type StatusError struct {
	ErrStatus unversioned.Status
}
type APIStatus interface {
	Status() unversioned.Status
}
var _ error = &StatusError{}
func (e *StatusError) Error() string {
	return e.ErrStatus.Message
}