Skip to content

Fix batch processing silently failing on error responses (#580)#581

Open
awkay wants to merge 3 commits intomainfrom
fix/580-batch-error-response
Open

Fix batch processing silently failing on error responses (#580)#581
awkay wants to merge 3 commits intomainfrom
fix/580-batch-error-response

Conversation

@awkay
Copy link
Copy Markdown
Member

@awkay awkay commented Apr 5, 2026

Summary

  • When a server returns a non-sequence body (e.g. {:error "A"} on a 404) to a batched read request, the batch result-handler assumed body was sequential, causing (first body) to return a map entry and the loop to terminate early
  • Load markers were never cleared and active remotes stayed stuck, making the app appear frozen
  • Fixed by checking body shape before dispatching: non-sequential bodies pass through intact to all handlers
  • Also fixed create-combined-node to skip select-keys filtering on non-200 responses so error bodies propagate correctly

Fixes #580

Test plan

  • New spec batched_processing_spec.cljc verifies all handlers receive the full error body and status code when server returns a map response
  • All 168 existing tx_processing_spec assertions still pass

🤖 Generated with Claude Code

awkay and others added 3 commits April 5, 2026 14:35
…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>
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.

Batch processing silently fails on wrong shaped inputs

1 participant