From ca2eba7040fe17192c357a6489117860f19b671b Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Wed, 24 Jan 2018 00:14:21 -0500 Subject: [PATCH] Distinguish service unavailable errors in client-go --- staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go b/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go index 3a2c9549ba2..bcc032df9dd 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -366,6 +366,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr case http.StatusUnprocessableEntity: reason = metav1.StatusReasonInvalid message = "the server rejected our request due to an error in our request" + case http.StatusServiceUnavailable: + reason = metav1.StatusReasonServiceUnavailable + message = "the server is currently unable to handle the request" case http.StatusGatewayTimeout: reason = metav1.StatusReasonTimeout message = "the server was unable to return a response in the time allotted, but may still be processing the request"