Skip to content

Add nil check in ErrorResponse.Error method#2971

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

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

Conversation

@rajatjindal
Copy link
Copy Markdown
Contributor

fixes #2970

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 23, 2023

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              
Files Coverage Δ
github/github.go 97.59% <88.88%> (-0.13%) ⬇️

Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
@rajatjindal rajatjindal force-pushed the fix-panic-errorresponse branch from ec14d72 to caea042 Compare October 23, 2023 16:32
@gmlewis gmlewis changed the title add nil check in ErrorResponse.Error method Add nil check in ErrorResponse.Error method Oct 23, 2023
Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

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

gmlewis commented Oct 23, 2023

Thank you, @WillAbides !
Merging.

Sign up for free to 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