Skip to content

Commit dc35e41

Browse files
committed
Added Exception in the ClientHttpResponse
1 parent f497317 commit dc35e41

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/com/intuit/springwebclient/client/CommonSpringWebClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,6 @@ private <REQUEST, RESPONSE> ClientHttpResponse<RESPONSE> handleExceptionInternal
196196
httpRequest.getRetryHandlers()
197197
.forEach(handlerId -> RetryHandlerFactory.getHandler(handlerId.toString())
198198
.checkAndThrowRetriableException(exception));
199-
return ClientHttpResponse.<RESPONSE>builder().error(responseBody).status(httpStatus).build();
199+
return ClientHttpResponse.<RESPONSE>builder().error(responseBody).exception(exception).status(httpStatus).build();
200200
}
201201
}

src/main/java/com/intuit/springwebclient/entity/ClientHttpResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public final class ClientHttpResponse<T>{
1010

1111
private final T response;
1212
private final String error;
13+
private final Exception exception;
1314
private final HttpStatusCode status;
1415
private final boolean isSuccess2xx;
1516

0 commit comments

Comments
 (0)