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

Return json.Unmarshal error when importing issues deferred #2892

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

nikpivkin
Copy link
Contributor

The error was not returned when the 202 status was received during the issues import.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #2892 (48a5fb2) into master (a0e8f35) will increase coverage by 0.04%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2892      +/-   ##
==========================================
+ Coverage   98.06%   98.10%   +0.04%     
==========================================
  Files         140      142       +2     
  Lines       12269    12340      +71     
==========================================
+ Hits        12031    12106      +75     
+ Misses        162      159       -3     
+ Partials       76       75       -1     
Files Changed Coverage Δ
github/issue_import.go 100.00% <100.00%> (+7.54%) ⬆️

... and 3 files with indirect coverage changes

@gmlewis gmlewis changed the title fix: return error when importing issues deferred Return json.Unmarshal error when importing issues deferred Aug 21, 2023
Copy link
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, @nikpivkin !
Could you please add a test case that demonstrates the problem?

In the past, I've found it really handy to demonstrate json.Unmarshal errors by forcing the data to be something bogus for JSON like {].

@nikpivkin
Copy link
Contributor Author

@gmlewis Hi! Fixed! The initial fix was that the error did not return when the response status was 202. (nil returned)

Copy link
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, @nikpivkin !
LGTM.

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

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 22, 2023

Thank you, @gabriel-samfira !
Merging.

@gmlewis gmlewis merged commit 38ca69f into google:master Aug 22, 2023
9 checks passed
gmlewis pushed a commit to gmlewis/go-github that referenced this pull request Sep 19, 2023
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.

3 participants