mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Merge pull request #6881 from nikhiljindal/errHandle
Registering a serviceErrorHandler with go-restful to always return JSON responses
This commit is contained in:
@@ -792,7 +792,7 @@ func (r *Request) transformUnstructuredResponseError(resp *http.Response, req *h
|
||||
message = strings.TrimSpace(string(body))
|
||||
}
|
||||
retryAfter, _ := retryAfterSeconds(resp)
|
||||
return errors.NewGenericServerResponse(resp.StatusCode, req.Method, r.resource, r.resourceName, message, retryAfter)
|
||||
return errors.NewGenericServerResponse(resp.StatusCode, req.Method, r.resource, r.resourceName, message, retryAfter, true)
|
||||
}
|
||||
|
||||
// isTextResponse returns true if the response appears to be a textual media type.
|
||||
|
Reference in New Issue
Block a user