Skip to content

Commit

Permalink
fix: pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Nov 3, 2023
1 parent c299091 commit 6de867f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/io/supertokens/webserver/RequestStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ public static RequestStats getInstance(Main main, AppIdentifier appIdentifier) t
.getResource(appIdentifier.getAsPublicTenantIdentifier(), RESOURCE_KEY);
} catch (TenantOrAppNotFoundException e) {
// appIdentifier parameter is coming from the API request and hence we need to check if the app exists
// before creating a resource for it, otherwise someone could fill up memory by making requests for apps that don't exist. The other resources are created during init or while refreshing
// tenants from the db, so we don't need this kind of pattern for those resources.
// before creating a resource for it, otherwise someone could fill up memory by making requests for apps
// that don't exist.
// The other resources are created during init or while refreshing tenants from the db, so we don't need
// this kind of pattern for those resources.
if (Multitenancy.getTenantInfo(main, appIdentifier.getAsPublicTenantIdentifier()) == null) {
throw e;
}
Expand Down

0 comments on commit 6de867f

Please sign in to comment.