> + case 402:
> + exception = new IllegalStateException(message, exception);
> + break;
> + case 404:
> + if
> (!command.getCurrentRequest().getMethod().equals("DELETE")) {
> + exception = new ResourceNotFoundException(message,
> exception);
> + }
> + break;
> + case 405:
> + exception = new IllegalArgumentException(message, exception);
> + break;
> + case 409:
> + exception = new IllegalStateException(message, exception);
> + break;
> + case 500:
> + exception = null;
So this has actually been addressed in recent commits. The 500 is no longer
returned but a one-liner "null", along with 200 response code, is sent instead.
I've pasted the output just below. This is true for all requests where
something specific is requested. Might this be a use-case for coding a custom
fallback for methods/requests which expect something specific returned but get
this "null" string?
> GET /api/engines/123 HTTP/1.1
> User-Agent: curl/7.37.1
> Host: sdrelnx150:8080
> Accept: */*
> X-Service-Key: Kxtie5Ujgs7SsqLzIgrDuwKJ9XU9yAuQwWri
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Tue, 23 Dec 2014 13:22:28 GMT
< Content-Length: 5
<
null
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/116/files#r22214785