[jbosstools-issues] [JBoss JIRA] (JBIDE-10484) When creating/editing applications/domains fails, no details about the cause are given

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Tue Feb 21 15:41:36 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-10484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669719#comment-12669719 ] 

Andre Dietisheim edited comment on JBIDE-10484 at 2/21/12 3:41 PM:
-------------------------------------------------------------------

made the following changes in the client library to report error details:

https://github.com/bdecoste/openshift-java-client/commit/ce54ca23e9b8cce6c417c1bf9cfa4c14e937bd91
https://github.com/bdecoste/openshift-java-client/commit/12662af4324e28d5d66be1264daa44b4b35ddf3a

The OpenShiftService will now unmarshall the service response and offer it in the OpenShiftEndpointException:
{code}
	private String sendRequest(final String request, final String url, final String password, final String authKey,
			final String authIV, final String errorMessage) throws OpenShiftException {
		try {
			String requestMessage = new OpenShiftEnvelopeFactory(password, authKey, authIV, request).createString();
			String response = createHttpClient(id, url, this.doSSLChecks).post(requestMessage);
			return JsonSanitizer.sanitize(response);
		} catch (MalformedURLException e) {
			throw new OpenShiftException(e, errorMessage);
		} catch (UnauthorizedException e) {
			throw new InvalidCredentialsOpenShiftException(url, e);
		} catch (NotFoundException e) {
			throw new NotFoundOpenShiftException(url, e);
		} catch (HttpClientException e) {
			throw new OpenShiftEndpointException(url, e, createNakedResponse(e.getMessage()), errorMessage);
		}
	}

	private OpenShiftResponse<Object> createNakedResponse(String response) throws OpenShiftException {
		return new NakedResponseUnmarshaller().unmarshall(response);
	}
{code}
                
      was (Author: adietish):
    made the following changes in the client library to report error details:

https://github.com/bdecoste/openshift-java-client/commit/ce54ca23e9b8cce6c417c1bf9cfa4c14e937bd91
https://github.com/bdecoste/openshift-java-client/commit/12662af4324e28d5d66be1264daa44b4b35ddf3a
                  
> When creating/editing applications/domains fails, no details about the cause are given
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-10484
>                 URL: https://issues.jboss.org/browse/JBIDE-10484
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 3.3.0.M5
>            Reporter: Andre Dietisheim
>            Assignee: Max Rydahl Andersen
>             Fix For: 3.3.0.Beta1
>
>         Attachments: could-not-configure.png, report-details-2.patch, report-details.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list