From 69b359b68970674b06b856be48d124a01c162235 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 9 Sep 2014 13:59:39 -0700 Subject: [PATCH] Don't stack trace on 301s --- pkg/apiserver/apiserver.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index d84056176a..ebc722b861 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -44,6 +44,10 @@ type defaultAPIServer struct { group *APIGroup } +const ( + StatusUnprocessableEntity = 422 +) + // Handle returns a Handler function that expose the provided storage interfaces // as RESTful resources at prefix, serialized by codec, and also includes the support // http resources. @@ -126,9 +130,11 @@ func RecoverPanics(handler http.Handler) http.Handler { httplog.StatusIsNot( http.StatusOK, http.StatusAccepted, + http.StatusMovedPermanently, http.StatusTemporaryRedirect, http.StatusConflict, http.StatusNotFound, + StatusUnprocessableEntity, ), ).Log()