Skip to content
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

Conversation

martinkunc
Copy link
Contributor

This should return (for log) the http body, for example if ingress returns http errors.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2020
@martinkunc
Copy link
Contributor Author

/test e2e-aws-upgrade

Copy link
Contributor

@tisnik tisnik left a 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.

@martinkunc martinkunc force-pushed the add-cloud.redhat.com-401-error branch from 019c588 to b291f02 Compare August 10, 2020 10:05
@martinkunc
Copy link
Contributor Author

/retest

1 similar comment
@martinkunc
Copy link
Contributor Author

/retest

@martinkunc martinkunc force-pushed the add-cloud.redhat.com-401-error branch from b291f02 to 2d58f94 Compare October 7, 2020 04:34
if r == nil {
return ""
}
body, _ := ioutil.ReadAll(r.Body)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@tremes
Copy link
Contributor

tremes commented Oct 7, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[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:
  • OWNERS [martinkunc,tisnik,tremes]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2020
@openshift-merge-robot openshift-merge-robot merged commit ada9d27 into openshift:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants