eclipse-ee4j / eclipse-ee4j/jersey

Suppressing unrecoverable exceptions logging in the ServerRuntime

Open
#5,776 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.