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

Suppressing unrecoverable exceptions logging in the ServerRuntime #5776

Open
wendigo opened this issue Oct 22, 2024 · 0 comments
Open

Suppressing unrecoverable exceptions logging in the ServerRuntime #5776

wendigo opened this issue Oct 22, 2024 · 0 comments

Comments

@wendigo
Copy link

wendigo commented Oct 22, 2024

There are several places in the ServerRuntime where Jersey is logging exceptions that happen during writing a response. In our scenario, we are using Jetty 12 with EE 10 container over HTTP/2. The client sends a request and aborts it after a specified wait time or because it's no longer interested in the result, which causes the reset frame to be sent to the Jetty server, which closes the response and recycles the request/response objects. When the response is being written/committed while the client aborts the request, ServerRuntime correctly observes IOException thrown by Jetty - these are unrecoverable exception which cannot be mapped to a Response since it's already gone and this would fail as well. I'd like to add a server configuration that will suppress logging of such errors.

I know that I can configure the logger to disable these warnings, but since this is a part of the deployment configuration for some of our customers, we cannot roll this change on our own easily.

I can prepare a PR that will implement this.

cc @jansupol

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

No branches or pull requests

1 participant