Skip to content

Commit be3914e

Browse files
committed
Add review comments
1 parent 3921894 commit be3914e

File tree

1 file changed

+6
-2
lines changed
  • components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils

1 file changed

+6
-2
lines changed

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/LifeCycleUtils.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,17 @@ private static void changeAPILifeCycle(APIProvider apiProvider, API api, String
173173
|| api.getApiExternalSandboxEndpoint() != null)) {
174174
if ((isOauthProtected && (tiers == null || tiers.size() == 0)) && !api.isAdvertiseOnly()
175175
&& !api.isInitiatedFromGateway()) {
176-
throw new APIManagementException("Failed to publish service to API store. No Tiers selected",
176+
String errorMessage = "Failed to publish service to API store. No Tiers selected";
177+
log.error(errorMessage + " for API: " + api.getUuid());
178+
throw new APIManagementException(errorMessage,
177179
ExceptionCodes.from(ExceptionCodes.FAILED_PUBLISHING_API_NO_TIERS_SELECTED,
178180
api.getUuid()));
179181
}
180182
} else {
181183
if (!api.isInitiatedFromGateway()) {
182-
throw new APIManagementException("Failed to publish service to API store. No endpoint selected",
184+
String errorMessage = "Failed to publish service to API store. No endpoint selected";
185+
log.error(errorMessage + " for API: " + api.getUuid());
186+
throw new APIManagementException(errorMessage,
183187
ExceptionCodes.from(ExceptionCodes.FAILED_PUBLISHING_API_NO_ENDPOINT_SELECTED,
184188
api.getUuid()));
185189
}

0 commit comments

Comments
 (0)