eclipse-ee4j / eclipse-ee4j/jersey

Add possibility to register exception handler to client

Open
#3,709 1 comment 0 reactions 0 assignees View on GitHub
Type: New Feature
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

At the moment the only possibility to catch an exception (that is caused by for example a timeout or an exception in a `ClientRequestFilter`) is to wrap the client itself in a `try/catch` block.

It would be helpful if for an existing client an exception handler could be registered.

This is for instance required if you want to trace the requests and responses. In the Happy Path scenario a trace can be started in `ClientRequestFilter` and stopped in `ClientResponseFilter`. In case of an exception the trace cannot be stopped.

An alternative could be an Interceptor. `WriterInterceptor` cannot be used as it only is called if there is a payload.

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.