Skip to content

Report a request timeout as HttpTimeoutException - #36

Merged
yogthos merged 2 commits into
mainfrom
request-timeout-exception
Oct 8, 2026
Merged

yogthos merged 2 commits into
mainfrom
request-timeout-exception

Conversation

@yogthos

@yogthos yogthos commented Oct 8, 2026

Copy link
Copy Markdown
Member

java.net.http raises HttpTimeoutException "request timed out" when the response headers don't arrive within HttpRequest.timeout. The shim let the transport's SocketTimeoutException through instead ("Read timed out", or "Response exceeded the request timeout" from the deadline check), so callers that classify a timeout by class or by the "timed out" wording missed it. The cap from set-max-response-ms! keeps its own message.

The body-stall half of jolt-lang/jolt#1282 (an SSE idle watchdog losing to the request timeout) is the #26 behaviour, fixed in #27 and shipped since v0.0.14: the request timeout stops at the headers. A project pinned before v0.0.14 still sees it.

Fixes jolt-lang/jolt#1282.

Yogthos added 2 commits October 8, 2026 13:40
java.net.http raises HttpTimeoutException "request timed out" when a
response's headers don't arrive within HttpRequest.timeout. The shim let the
socket's SocketTimeoutException through, so callers classifying a timeout by
class or by babashka.http-client's "timed out" wording missed it
(jolt-lang/jolt#1282).
check-deadline! reported the set-max-response-ms! cap whenever one was set,
even when the sooner request deadline was the one that fired. Under a cap, a
request timeout then read as the total time limit and request-timeout-ex left
it a SocketTimeoutException. effective-deadline now records which bound is in
force.
@yogthos
yogthos merged commit 00455b8 into main Oct 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant