Skip to content

Comments

Fix JSON parse error for HEAD requests in Bun runtime (#821)#841

Merged
bluepal-yaswanth-peravali merged 1 commit intomainfrom
821-collectiondocumentexists-return-json-parse-error-unexpected-eof
Jan 22, 2026
Merged

Fix JSON parse error for HEAD requests in Bun runtime (#821)#841
bluepal-yaswanth-peravali merged 1 commit intomainfrom
821-collectiondocumentexists-return-json-parse-error-unexpected-eof

Conversation

@bluepal-yaswanth-peravali
Copy link
Contributor

Fix: JSON Parse Error for HEAD Requests (#821)

Fixes issue where documentExists, vertexExists, and edgeExists throw "JSON Parse error: Unexpected EOF" in Bun runtime.

Root Cause: Connection layer attempted to parse response bodies for HEAD requests, which violate HTTP spec (RFC 7231).

Solution: Skip body parsing for HEAD requests in connection response handler.

Impact: Fixes Bun compatibility, improves behavior across all fetch implementations, no breaking changes.

@bluepal-yaswanth-peravali bluepal-yaswanth-peravali merged commit 9e451fd into main Jan 22, 2026
23 checks passed
@bluepal-yaswanth-peravali bluepal-yaswanth-peravali deleted the 821-collectiondocumentexists-return-json-parse-error-unexpected-eof branch January 22, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection#documentExists return JSON Parse error: Unexpected EOF

2 participants