Distinguish service unavailable errors in client-go

parent 35ed5338
...@@ -366,6 +366,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr ...@@ -366,6 +366,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr
case http.StatusUnprocessableEntity: case http.StatusUnprocessableEntity:
reason = metav1.StatusReasonInvalid reason = metav1.StatusReasonInvalid
message = "the server rejected our request due to an error in our request" 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: case http.StatusGatewayTimeout:
reason = metav1.StatusReasonTimeout reason = metav1.StatusReasonTimeout
message = "the server was unable to return a response in the time allotted, but may still be processing the request" message = "the server was unable to return a response in the time allotted, but may still be processing the request"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment