-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report the returned response body to log the error detail from cloud.redhat.com #142
Report the returned response body to log the error detail from cloud.redhat.com #142
Conversation
/test e2e-aws-upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks ok @martinkunc . I'd probably use named constant for this 1024 value, so it can be changed easily later. But it is nitpick.
019c588
to
b291f02
Compare
/retest |
1 similar comment
/retest |
b291f02
to
2d58f94
Compare
if r == nil { | ||
return "" | ||
} | ||
body, _ := ioutil.ReadAll(r.Body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK to ignore the error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, see the original version. We are trying to log what we received from response. If we cannot, we will log empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yes...sorry I was looking rather at the green fields than the red ones.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: martinkunc, tisnik, tremes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This should return (for log) the http body, for example if ingress returns http errors.