* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ExceptionHandler({RestClientResponseException.class})
public final ResponseEntity<ErrorTransport> handleProxyMethodException(Exception ex, WebRequest request) {
// Capture the full stack trace in the log.
@ExceptionHandler({RestClientResponseException.class})
public final ResponseEntity<ErrorTransport> handleProxyMethodException(Exception ex, WebRequest request) {
// Capture the full stack trace in the log.
- log.error("handleProxyMethodException: request {}, exception {}", request.getDescription(false), ex);
+ log.error("handleProxyMethodException: request {}, exception {}", request.getDescription(false),
+ ex.getMessage());
if (ex instanceof HttpStatusCodeException) {
HttpStatusCodeException hsce = (HttpStatusCodeException) ex;
return new ResponseEntity<>(new ErrorTransport(hsce.getRawStatusCode(), hsce.getResponseBodyAsString(),
if (ex instanceof HttpStatusCodeException) {
HttpStatusCodeException hsce = (HttpStatusCodeException) ex;
return new ResponseEntity<>(new ErrorTransport(hsce.getRawStatusCode(), hsce.getResponseBodyAsString(),