Fix batch processing silently failing on error responses (#580)#581
Open
Fix batch processing silently failing on error responses (#580)#581
Conversation
…580) When a server returns a map body (e.g. {:error "A"} on a 404) instead of a sequence, the batch result-handler assumed body was sequential and would silently corrupt/drop results. This left load markers stuck at :loading and active remotes never clearing. The fix checks body shape before dispatching: non-sequential bodies are passed through intact to all handlers. The combined-node result-handler also skips select-keys filtering on non-200 responses so error bodies propagate correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The http_remote_spec.clj test (added in 4a674ec) requires http-kit, which was only in the :dev alias. GitHub Actions CI uses :test:clj-tests and has been failing since February. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
{:error "A"}on a 404) to a batched read request, the batch result-handler assumedbodywas sequential, causing(first body)to return a map entry and the loop to terminate earlycreate-combined-nodeto skipselect-keysfiltering on non-200 responses so error bodies propagate correctlyFixes #580
Test plan
batched_processing_spec.cljcverifies all handlers receive the full error body and status code when server returns a map responsetx_processing_specassertions still pass🤖 Generated with Claude Code