mirror of https://github.com/k3s-io/k3s
commit
a4e3a4e351
|
@ -44,6 +44,10 @@ type defaultAPIServer struct {
|
||||||
group *APIGroup
|
group *APIGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
StatusUnprocessableEntity = 422
|
||||||
|
)
|
||||||
|
|
||||||
// Handle returns a Handler function that expose the provided storage interfaces
|
// Handle returns a Handler function that expose the provided storage interfaces
|
||||||
// as RESTful resources at prefix, serialized by codec, and also includes the support
|
// as RESTful resources at prefix, serialized by codec, and also includes the support
|
||||||
// http resources.
|
// http resources.
|
||||||
|
@ -126,9 +130,11 @@ func RecoverPanics(handler http.Handler) http.Handler {
|
||||||
httplog.StatusIsNot(
|
httplog.StatusIsNot(
|
||||||
http.StatusOK,
|
http.StatusOK,
|
||||||
http.StatusAccepted,
|
http.StatusAccepted,
|
||||||
|
http.StatusMovedPermanently,
|
||||||
http.StatusTemporaryRedirect,
|
http.StatusTemporaryRedirect,
|
||||||
http.StatusConflict,
|
http.StatusConflict,
|
||||||
http.StatusNotFound,
|
http.StatusNotFound,
|
||||||
|
StatusUnprocessableEntity,
|
||||||
),
|
),
|
||||||
).Log()
|
).Log()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue