Skip to content

Commit

Permalink
Add a log to indicate subscription validation failures
Browse files Browse the repository at this point in the history
  • Loading branch information
VirajSalaka committed Dec 19, 2023
1 parent c0d0d97 commit 5d66316
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,20 @@ public static APIKeyValidationInfoDTO validateSubscription(APIConfig apiConfig,
String apiContextTemplate = apiContext.substring(0, lastIndexOfVersion);
sub = datastore.getSubscriptionByAppIdApiContextVersionRange(app.getUUID(),
apiContextTemplate, "v" + apiSemVersion.getMajor());
if (sub == null) {
log.info(
"Valid subscription not found for oauth access token. application:" +
" {} app_UUID: {} API_Context:API_Version: {} API_UUID : {}",
app.getName(), app.getUUID(), apiContext + ":" + apiVersion, uuid);
} else {
log.debug("All information is retrieved from the in-memory data store.");
}
} catch (EnforcerException e) {
log.debug("API version: {} is not a valid semantic version", apiVersion);
}
} else {
log.debug("All information is retrieved from the in-memory data store.");
}
if (sub == null) {
log.info(
"Valid subscription not found for oauth access token. application:" +
" {} app_UUID: {} API_Context:API_Version: {} API_UUID : {}",
app.getName(), app.getUUID(), apiContext + ":" + apiVersion, uuid);
} else {
log.debug("All information is retrieved from the in-memory data store.");
}
} else {
log.info("Application not found in the data store for uuid " + key.getApplicationUUID());
}
Expand Down

0 comments on commit 5d66316

Please sign in to comment.