Check HTTP status code in request_stream
#1300
Labels
bug
Something isn't working
client
http issues with the client
help wanted
Not immediately prioritised, please help!
Would you like to work on this feature?
yes
What problem are you trying to solve?
The
request_stream
function doesn't callhandle_api_errors
as other functions. User can't easily tell whether the returned HTTP body is for an error response or successful response.Describe the solution you'd like
In
request_stream
, check the response code. If it's an error, fetch the whole HTTP body, parse the error and returnErr
.Describe alternatives you've considered
Include the headers in the returned
Ok
variant ofrequest_stream
.Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-client
The text was updated successfully, but these errors were encountered: