Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,15 @@ public Object invoke(String methodName, Object argument, Type returnType, Map<St
try {
response = this.restTemplate.postForObject(serviceUrl.get().toExternalForm(), requestHttpEntity, ObjectNode.class);
} catch (HttpStatusCodeException httpStatusCodeException) {
logger.error("HTTP Error code={} status={}\nresponse={}"
, httpStatusCodeException.getStatusCode().value()
, httpStatusCodeException.getStatusText()
, httpStatusCodeException.getResponseBodyAsString()
int statusCode = httpStatusCodeException.getRawStatusCode();
logger.error("HTTP Error code={} status={}\nresponse={}",
statusCode,
httpStatusCodeException.getStatusText(),
httpStatusCodeException.getResponseBodyAsString()
);
Integer jsonErrorCode = DefaultHttpStatusCodeProvider.INSTANCE.getJsonRpcCode(httpStatusCodeException.getStatusCode().value());
Integer jsonErrorCode = DefaultHttpStatusCodeProvider.INSTANCE.getJsonRpcCode(statusCode);
if (jsonErrorCode == null) {
jsonErrorCode = httpStatusCodeException.getStatusCode().value();
jsonErrorCode = statusCode;
}
throw new JsonRpcClientException(jsonErrorCode, httpStatusCodeException.getStatusText(), null);
} catch (HttpMessageConversionException httpMessageConversionException) {
Expand Down
Loading