Handle non-JSON Cloud Query error responses - #3118
Merged
Merged
Conversation
adamtheturtle
temporarily deployed
to
development
August 4, 2026 13:36 — with
GitHub Actions
Inactive
adamtheturtle
marked this pull request as ready for review
August 4, 2026 15:12
adamtheturtle
temporarily deployed
to
development
August 4, 2026 15:18 — with
GitHub Actions
Inactive
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.
Summary
CloudRecoErrorfor documented empty or non-JSON Cloud Query 4xx responsesvws-python-mock==2026.8.4.1The mock support was merged in vws-python-mock#3315 and released by workflow run 30913240037.
Validation
pytest: 325 passed with 100% coverageCloses #3093
Note
Low Risk
Localized error-handling change in Cloud Query with matching tests; dependency cleanup only affects dev/test installs.
Overview
Cloud Query sync and async clients now treat documented 4xx responses with empty or non-JSON bodies as
CloudRecoError(with the HTTP response attached) instead of surfacingJSONDecodeError. Parsing is centralized in a singleresponse_bodyload; successful responses with invalid JSON still raiseJSONDecodeError.Dev tooling drops explicit PyTorch/torchvision pins and the CPU PyTorch uv index, and bumps
vws-python-mockto 2026.8.4.1 so tests can force Cloud Query failures viaCloudQueryFailureResponse. New tests cover empty and arbitrary-text 4xx bodies plus malformed 200 responses for both clients.Reviewed by Cursor Bugbot for commit f8344ed. Bugbot is set up for automated code reviews on this repo. Configure here.