> + VersionsJsonResponse versions = > json.fromJson(Strings2.toStringAndClose(response), > VersionsJsonResponse.class); > + for (VersionsJsonResponse.Version version : > versions.versions) { > + if (apiVersion.equals(version.id)) { > + URI versionedEndpointUri = new > URI(version.links.get(0).href); > + return new URI(baseEndpointUri.getScheme(), > versionedEndpointUri.getUserInfo(), > + versionedEndpointUri.getHost(), > versionedEndpointUri.getPort(), > + versionedEndpointUri.getPath(), > versionedEndpointUri.getQuery(), > + versionedEndpointUri.getFragment()); > + } > + } > + } catch (URISyntaxException ex) { > + throw Throwables.propagate(ex); > + } catch (IOException ex) { > + throw Throwables.propagate(ex); > + } > + throw new HttpException("Glance endpoint does not support > API version: " + apiVersion);
Is `HttpException` the best choice here? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/82/files#r11095394