mirror of https://github.com/k3s-io/k3s
Merge pull request #58735 from liggitt/server-unavailable-errors
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Distinguish service unavailable errors in client-go related to https://github.com/kubernetes/kubernetes/issues/58642 the server is returning correct errors, but the client was not distinguishing service unavailable errors from general 5xx errors ```release-note NONE ```pull/6/head
commit
068e1642f6
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue