On Mon, 15 Dec 2025 13:24:27 GMT, Jaikiran Pai <[email protected]> wrote:

> The API specification of HttpClient for send/sendAsync currently only specify 
> IOException with no specific expectations of HTTP protocol specific exception 
> types

Even though its nice do document all possible subtypes I think its not 
specifically forbidden (or can be enforced) and there is at least on precedence 
with `HttpTimeoutException` (and I can think of many more e.g EOFException in 
general) and `jdk.internal.net.http.common.Utils.toConnectException(Throwable)` 
even checks for some of those already (and I see none of those explicitly 
documented).

So I think it not necessarily requires a specification change, for a first step 
it could even be non public internal types like 
`jdk.internal.net.http.common.ConnectionExpiredException`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28632#discussion_r2619659317

Reply via email to