From 5ddb2abe6e22092f719e4a1a89c20af08ca39648 Mon Sep 17 00:00:00 2001 From: BLasan Date: Tue, 10 Sep 2024 01:38:39 +0530 Subject: [PATCH] Fix: Custom Backend Get Issue --- .../apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java index 2c1f5b601bb9..c0612ea60423 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java @@ -174,7 +174,7 @@ public Response getCustomBackendData(String type, String customBackendId, String Map endpointConfig = apiProvider.getCustomBackendOfAPIByUUID(customBackendId, apiId, type, false); - if (endpointConfig != null) { + if (endpointConfig == null) { throw new APIMgtResourceNotFoundException( "Couldn't retrieve an existing Custom Backend with ID: " + customBackendId + " for API " + apiId, ExceptionCodes.from(ExceptionCodes.CUSTOM_BACKEND_NOT_FOUND, customBackendId));