Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x: UncheckedIOException no longer a special case #9206

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

tomas-langer
Copy link
Member

Resolves #9192

No longer using UncheckedIOException as a special case for the server.
Server I/O failures now throw a ServerConnectionException, and that extends the CloseConnectionException (which already has its special handling).

This change allows user to handle UncheckIOException as if it is any other throwable.

As part of this change:

  • all reads on server (from server request reader) are now wrapped and no longer throw UncheckedIOException
  • all writes on server (to server response writer) are surrounded by try/catch blocks to handle this exception.

This is a small behavior change. The original behavior was not documented, and the result was not ideal (as we would close connection even if the UncheckedIOException came from client call to another service).
The new behavior only closes connection with specific exception.

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
Server I/O failures now throw a ServerConnectionException, and that extends the CloseConnectionException (which already has its special handling).

This change allows user to handle UncheckIOException as if it is any other throwable.

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
@tomas-langer tomas-langer added this to the 4.2.0 milestone Aug 26, 2024
@tomas-langer tomas-langer self-assigned this Aug 26, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 26, 2024
Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
…ttp1Connection.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
@tomas-langer tomas-langer merged commit 1f30d97 into helidon-io:main Aug 29, 2024
44 checks passed
@tomas-langer tomas-langer deleted the 9192-unchecked-io branch August 29, 2024 12:09
@tomas-langer tomas-langer mentioned this pull request Sep 27, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x OCA Verified All contributors have signed the Oracle Contributor Agreement. webserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default error handler does not return a 5xx on UncheckedIOException
3 participants