Skip to content

Commit f1239f4

Browse files
committed
Minor change to adjust the base instance
1 parent 17d6bd8 commit f1239f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

azd/src/main/java/org/azd/utils/RestClientProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public final class RestClientProvider extends BaseRestClient {
2727
private static String getLocationUrl(String resourceID, String organizationName) throws AzDException {
2828

2929
String INSTANCE = Instance.BASE_INSTANCE.getInstance();
30+
INSTANCE = INSTANCE.replaceAll("/$", "") + "/";
3031

3132
if (resourceID == null) return (INSTANCE + organizationName);
3233

@@ -50,7 +51,8 @@ private static String getLocationUrl(String resourceID, String organizationName)
5051
String r = MAPPER.mapJsonResponse(response, LocationUrl.class).getLocationUrl();
5152
return r.replaceAll("/$", "");
5253
} catch (Exception e) {
53-
throw new AzDException(ApiExceptionTypes.InvalidOrganizationNameException.name(), "Couldn't find the organization name '" + organizationName + "'.");
54+
throw new AzDException(ApiExceptionTypes.InvalidOrganizationNameException.name(),
55+
"Couldn't find the organization name '" + organizationName + "' in instance '" + INSTANCE + "'.");
5456
}
5557
}
5658

0 commit comments

Comments
 (0)