eclipse-ee4j / eclipse-ee4j/jersey

Missing RequestInfo in ProcessingException in connection with RxJava

Open
#3,372 3 comments 0 reactions 0 assignees View on GitHub
Priority: Major Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

In case of synchronous request, you may provide failing uri of your request in case of ProcessingExceptions

WebTarget target = this.buildBaseTarget(aPath);
try

{ Builder builder = this.prepareMyRequest(target, requestInfo); return builder.get(); }

catch (ProcessingException ex)

{ GregorianCalendar calendar = new GregorianCalendar(); Date now = calendar.getTime(); SimpleDateFormat datetimeFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); logger.info("REQ Time:" + datetimeFormat.format(now) + "#Method:GET#Request:" + target.getUri() + "#Status:" + String.valueOf(myEx.getError().getErrorCode()) + "#Duration:0 secs"); logger.error("Request exception", ex.getMessage()); throw myEx; }

In case of an rx Request in combination with eg RxJava, I just get the ProcessingException as an Observable onError.

Might it be possible to extend Processing Exception class by attributes which inform about request details such as uri ?
#### Affected Versions
[2.21]

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.