Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

RestServiceClient from latest micro-infra-spring throws ExecutionException instead of ResponseException #139

Closed
mariuszs opened this issue Dec 18, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@mariuszs
Copy link
Collaborator

Stack trace:

Expected exception com.ofg.infrastructure.web.resttemplate.custom.ResponseException, but got java.util.concurrent.ExecutionException
(...)
Caused by: com.ofg.infrastructure.web.resttemplate.custom.ResponseException: Status code: [406], Headers: [[Content-Type:[application/json], Content-Length:[369], Server:[Jetty(6.1.26)]]], Body: [{
                                     message: "Foo error"
                                     }]
    at com.ofg.infrastructure.web.resttemplate.custom.ResponseRethrowingErrorHandler.handleError(ResponseRethrowingErrorHandler.groovy:27)
    at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:615)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:573)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:544)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:465)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.urlExchange_closure2(RestExecutor.groovy:71)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.urlExchange_closure2(RestExecutor.groovy)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.withRetry_closure3_closure4(RestExecutor.groovy:80)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.withRetry_closure3_closure4(RestExecutor.groovy)
    at groovy.lang.Closure.call(Closure.java:423)
    at groovy.lang.Closure.call(Closure.java:417)
    at com.ofg.infrastructure.correlationid.CorrelationIdUpdater.withId(CorrelationIdUpdater.groovy:42)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.withRetry_closure3(RestExecutor.groovy:79)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.withRetry_closure3(RestExecutor.groovy)
    at groovy.lang.Closure.call(Closure.java:423)
    at groovy.lang.Closure.call(Closure.java:417)
    at com.nurkiewicz.asyncretry.SyncRetryExecutor.getWithRetry(SyncRetryExecutor.java:37)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.withRetry(RestExecutor.groovy:78)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.urlExchange(RestExecutor.groovy:67)
    at com.ofg.infrastructure.web.resttemplate.fluent.common.response.executor.RestExecutor.exchangeInternal(RestExecutor.groovy:41)
    ... 5 more

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants