Skip to content

Commit

Permalink
Fix NPE in API log handler
Browse files Browse the repository at this point in the history
  • Loading branch information
SavinduDimal committed Feb 1, 2024
1 parent 7cde9e3 commit 7c673c0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public static void logAPI(String flow, MessageContext messageContext) {

// Get API details and set custom properties to ThreadContext
String path = ApiUtils.getFullRequestPath(messageContext);
TreeMap<String, API> selectedApis = Utils.getSelectedAPIList(path, GatewayUtils.getTenantDomain());
TreeMap<String, API> selectedApis = Utils.getSelectedAPIList(path,
(String) messageContext.getProperty(APIConstants.TENANT_DOMAIN_INFO_PROPERTY));
if (selectedApis.size() > 0) {
String selectedPath = selectedApis.firstKey();
API selectedApi = selectedApis.get(selectedPath);
Expand Down

0 comments on commit 7c673c0

Please sign in to comment.