-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
With the change in JBIDE-13763, which implemented human readable exceptions that tell the user to what server the exception was occurring, we lost the ability to get the json from the exception. This is not ideal since the json contains the exact error message and error code from the server.
Before JBIDE-13763 OpenShiftEndpointException reported the server returned json as object when one called OpenShiftEndpointException#getRestResponse. OpenShiftEndpointException internally by getting the message from the HttpClientException it is wrapping:
} catch (HttpClientException e) { throw new OpenShiftEndpointException( url.toString(), e, e.getMessage(), "Could not request {0}: {1}", url.toString(), getResponseMessage(e));
before JBIDE-13763:
{ "data":null, "errors":{ }, "messages":[ { "exit_code":128, "field":null, "severity":"error", "text":"Domain contains applications. Delete applications first or set force to true." } ], "status":"bad_request", "supported_api_versions":[ 1.0, 1.1, 1.2, 1.3 ], "type":null, "version":"1.0" }
after JBIDE-13763:
Connection to https://stg.openshift.redhat.com/broker/rest/domains/1363341069128, { "data":null, "errors":{ }, "messages":[ { "exit_code":128, "field":null, "severity":"error", "text":"Domain contains applications. Delete applications first or set force to true." } ], "status":"bad_request", "supported_api_versions":[ 1.0, 1.1, 1.2, 1.3 ], "type":null, "version":"1.0" }
When the user asks the OpenShiftEndpointException for the json from the server it would call OpenShiftEndpointException#getRestResponse() which would parse the message from json and return a RestResponse object.
- blocks
-
JBIDE-13819 include latest openshift-java-client in JBoss Tools
- Closed
- is related to
-
OSJC-44 openshift-java-client: exception does not say to what server it was trying to connect
- Closed