Skip to content

Commit 405a417

Browse files
tmacroclaude[bot]
andauthored
Apply suggestions from code review
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
1 parent 73691f0 commit 405a417

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/api/apiUtils/rateLimit/cleanup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function cleanupJob(log, options = {}) {
1010
log.debug('Rate limit cleanup completed', { expiredConfigs, expiredBucketOwners });
1111
}
1212

13-
cleanupTimer = setTimeout(() => cleanupJob(log), rateLimitCleanupInterval);
13+
cleanupTimer = setTimeout(() => cleanupJob(log, options), rateLimitCleanupInterval);
1414
if (!options.skipUnref) {
1515
cleanupTimer.unref();
1616
}

lib/api/apiUtils/rateLimit/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function getCachedRateLimitConfig(request) {
144144

145145
function buildRateChecksFromConfig(resourceClass, resourceId, limitConfig) {
146146
const checks = [];
147-
if (limitConfig.RequestsPerSecond?.Limit > 0) {
147+
if (limitConfig?.RequestsPerSecond?.Limit > 0) {
148148
checks.push({
149149
resourceClass,
150150
resourceId,

0 commit comments

Comments
 (0)