Need com.googlecode.jsonrpc4j.spring.rest.JsonRpcResponseErrorHandler fixing
Closed this issue · 2 comments
-
JsonRpcResponseErrorHandler - has been designed as enum, so it cann't be extended. For example for procesing specific http errors (as example 401)
-
method getResponseBody() process response (for example HTTP 401) incorrectly when HttpUrlConnection works in streaming mode.
java.lang.RuntimeException: cannot retry due to server authentication, in streaming mode
at com.googlecode.jsonrpc4j.spring.rest.JsonRpcResponseErrorHandler.getResponseBody(JsonRpcResponseErrorHandler.java:92) ~[jsonrpc4j-1.5.0.jar:1.5.0]
at com.googlecode.jsonrpc4j.spring.rest.JsonRpcResponseErrorHandler.handleError(JsonRpcResponseErrorHandler.java:64) ~[jsonrpc4j-1.5.0.jar:1.5.0]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:380) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at com.googlecode.jsonrpc4j.spring.rest.JsonRpcRestClient.invoke(JsonRpcRestClient.java:216) ~[jsonrpc4j-1.5.0.jar:1.5.0]
at com.googlecode.jsonrpc4j.spring.rest.JsonRestProxyFactoryBean.invoke(JsonRestProxyFactoryBean.java:92) ~[jsonrpc4j-1.5.0.jar:1.5.0]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
@im-scooter feel free to create a PR. At the moment I'll accept PRs and release them, however my focus has shifted away from this project otherwise.
pull request #175