Information provided by skipperClient on errors
We are using skipperclient to call upload, install, upgrade, delete. Ideally if an error takes place it would be nice to receive the error code along and a clearer message, if possible. If possible, an excerpt from the stack trace would also be helpful.
Currently, all responses are the HTTP response code and null.
Example is below. In the case of a 404 it is quite obvious what the error is, but for other situations it can be more difficult (e.g. release is not in an appropriate state).
org.springframework.web.client.HttpClientErrorException: 404 null
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:85)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:707)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:620)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:387)
at org.springframework.cloud.skipper.client.DefaultSkipperClient.upgrade(DefaultSkipperClient.java:221)
The only way to debug errors is to check the logs on the server. In some cases it is necessary to connect with a remote debugger.
This actually relates or is a dup of #370 whose PR we never merged as we realised that this layer passing errors from a server to client via client api's needs a complete overhaul. But having said that, you're right about what you wrote!