Skip to content

Commit

Permalink
Merge pull request #12633 from HeshanSudarshana/master-mgw-apim-4x-su…
Browse files Browse the repository at this point in the history
…pport-3

Add improvement to yield error when the requested API is not available when exporting APIs
  • Loading branch information
HeshanSudarshana authored Oct 5, 2024
2 parents 81b93b0 + 7a4d804 commit 4ec7cfa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3469,6 +3469,10 @@ public Response createNewAPIVersion(String newVersion, String apiId, Boolean def
if (StringUtils.isEmpty(apiId) && (StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(version))) {
APIIdentifier apiIdentifier = new APIIdentifier(providerName, name, version);
apiId = APIUtil.getUUIDFromIdentifier(apiIdentifier, organization);
if (StringUtils.isEmpty(apiId)) {
throw new APIManagementException("API not found for the given name: " + name + ", and version : "
+ version, ExceptionCodes.from(ExceptionCodes.API_NOT_FOUND, name + "-" + version));
}
}
RuntimeArtifactDto runtimeArtifactDto = null;
if (StringUtils.isNotEmpty(organization)) {
Expand Down

0 comments on commit 4ec7cfa

Please sign in to comment.