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

fix: nil check http response when err is not nil (PROJQUAY-6620) #110

Closed
wants to merge 1 commit into from

Conversation

arborite-rh
Copy link
Contributor

@arborite-rh arborite-rh commented Feb 27, 2024

Topic: projquay-6507

The operator was panicking due to the httpResponse being nil and attempting to return the httpResponse.StatusCode in the response; the response was most likely nil due to a prior error when attempting to marshal json and build the http request itself. This now allows the error to be propagated out to the logs instead of causing the operator to panic

Signed-off-by: Ross Bryan robryan@redhat.com

@arborite-rh
Copy link
Contributor Author

arborite-rh commented Feb 27, 2024

Reviews in this chain:
#110 fix: nil check http response when err is not nil (PROJQUAY-6620)

@arborite-rh
Copy link
Contributor Author

arborite-rh commented Feb 27, 2024

# head base diff date summary
0 44a5dd1a 2f224adc diff Feb 27 15:42 PM 1 file changed, 9 insertions(+)
1 c72cd2de 2f224adc diff Feb 27 15:45 PM 0 files changed

Copy link
Contributor

openshift-ci bot commented Feb 27, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arborite-rh
Once this PR has been reviewed and has the lgtm label, please assign jonathankingfc for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

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

Topic: projquay-6507

The operator was panicking due to the httpResponse being nil and attempting to return the httpResponse.StatusCode in the response; the response was most likely nil due to a prior error when attempting to marshal json and build the http request itself. This now allows the error to be propagated out to the logs instead of causing the operator to panic

Signed-off-by: Ross Bryan <robryan@redhat.com>
@arborite-rh arborite-rh changed the title fix: nil check http response when err is not nil (PROJQUAY-6507) fix: nil check http response when err is not nil (PROJQUAY-6620) Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant