eclipse-ee4j / eclipse-ee4j/jersey
Missing RequestInfo in ProcessingException in connection with RxJava
- 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
Assessment
This issue has not been assessed yet.