fix typo in DownloadArtifact: was reading req.Body instead of resp.Body#338
Open
Priyanshubhartistm wants to merge 1 commit into
Open
Conversation
After httpClient.Do(req) returns, req.Body is already consumed — so io.ReadAll(req.Body) always gives back empty bytes. Swapped it to resp.Body so we actually get the server's response back. Also fixed the two log labels that still said "uploading artifact" inside the download path (copy-paste leftover from UploadArtifact). Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
This was referenced May 9, 2026
Author
|
Hi @Harsh4902, @lbroudoux Could you please review this PR when you get a chance? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After
httpClient.Do(req)returns,req.Bodyis already consumed - soio.ReadAll(req.Body)always gives back empty bytes. Swapped it toresp.Bodyso we actually get the server's response back.Also fixed the two log labels that still said "uploading artifact" inside the download path (copy-paste leftover from
UploadArtifact).Description
DownloadArtifactwas callingio.ReadAll(req.Body)instead ofio.ReadAll(resp.Body), meaning the server response was always silently discardedMicrocks has discovered ''(empty string - service name was never captured)Got error when invoking Microcks client importing Artifact:and no further detailDumpRequestIfRequired/DumpResponseIfRequiredlog labels inDownloadArtifactthat still said"uploading artifact"(copy-pasted fromUploadArtifactand never updated)Related issue(s)
Fixes #337