spring-cloud-skipper icon indicating copy to clipboard operation
spring-cloud-skipper copied to clipboard

Information provided by skipperClient on errors

Open menelaosbgr opened this issue 7 years ago • 1 comments

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.

menelaosbgr avatar Apr 17 '18 16:04 menelaosbgr

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!

jvalkeal avatar Apr 18 '18 09:04 jvalkeal