Skip to content

Add nil check in ErrorResponse.Error method - #2971

Merged
gmlewis merged 1 commit into
google:masterfrom
rajatjindal:fix-panic-errorresponse
Oct 23, 2023
Merged

Add nil check in ErrorResponse.Error method#2971
gmlewis merged 1 commit into
google:masterfrom
rajatjindal:fix-panic-errorresponse

Conversation

@rajatjindal

Copy link
Copy Markdown
Contributor

fixes#2970

@codecov

codecovBot commented Oct 23, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2971 (ec14d72) into master (eea6e0a) will decrease coverage by 0.01%.
The diff coverage is 88.88%.

❗ Current head ec14d72 differs from pull request most recent head caea042. Consider uploading reports for the commit caea042 to get more accurate results

@@ Coverage Diff @@## master #2971 +/- ##
==========================================
- Coverage 98.11% 98.10% -0.01% 
==========================================
Files 149 149 Lines 12790 12796 +6 ==========================================
+ Hits 12549 12554 +5 - Misses 166 167 +1 
Partials 75 75 
FilesCoverage Δ
github/github.go97.59% <88.88%> (-0.13%)⬇️

Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
@rajatjindal
rajatjindalforce-pushed the fix-panic-errorresponse branch from ec14d72 to caea042CompareOctober 23, 2023 16:32
@gmlewisgmlewis changed the title add nil check in ErrorResponse.Error methodAdd nil check in ErrorResponse.Error methodOct 23, 2023

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @rajatjindal !
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you, @WillAbides !
Merging.

@gmlewis
gmlewis merged commit 3c49fd9 into google:masterOct 23, 2023
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ErrorResponse.Error() method can panic if err.Response.Request is nil

3 participants

@rajatjindal@gmlewis@WillAbides