Registering serviceErrorHandler with go-restful

This commit is contained in:
nikhiljindal
2015-04-15 16:33:35 -07:00
parent 6cfce2c7ee
commit f9132dc572
4 changed files with 27 additions and 9 deletions

View File

@@ -785,7 +785,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.