Open
Conversation
After PR #3831, when HTTP 200 OK is returned with partial failures in the body, the client was treating it as complete success. This updates the client to properly parse the UploadResponse and return per-report errors. Changes: - Add Error::Upload variant to convey per-report errors - Update put_report and upload_with_ohttp to parse and return UploadResponse - Check for per-report errors in upload_with_time even with HTTP 200 status - Add tests for per-report error handling Fixes #4146
tgeoghegan
reviewed
Feb 12, 2026
| if let Some(upload_response) = upload_response { | ||
| let failed_reports = upload_response.status(); | ||
| if !failed_reports.is_empty() { | ||
| return Err(Error::Upload(failed_reports.to_vec())); |
Contributor
There was a problem hiding this comment.
It's kind of a shame to have to copy the &[ReportUploadStatus] to Vec<ReportUploadStatus> since the enclosing struct gets dropped. We could do UploadResponse::take_status(self) -> Vec<ReportUploadStatus> and explicitly yoink the Vec. But honestly the compiler is probably smart enough to avoid the copy here, and it's not worth investing work until/unless we measure a performance problem here.
Contributor
Author
There was a problem hiding this comment.
It should be short, too, since it's only the failed jobs.
... should. :)
tgeoghegan
approved these changes
Feb 12, 2026
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 PR #3831, when HTTP 200 OK is returned with partial failures in the body, the client was treating it as complete success. This updates the client to properly parse the UploadResponse and return per-report errors.
Changes:
Fixes #4146