We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f77bb1 commit f13ef9cCopy full SHA for f13ef9c
test/rateLimiters/tokenBucket.test.ts
@@ -17,6 +17,7 @@ const user4 = '4';
17
18
async function getBucketFromClient(redisClient: RedisType, uuid: string): Promise<RedisBucket> {
19
const res = await redisClient.get(uuid);
20
+ // if no uuid is found, return -1 for tokens and timestamp, which are both impossible
21
if (res === null) return { tokens: -1, timestamp: -1 };
22
return JSON.parse(res);
23
}
0 commit comments