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 d628a79 commit 36cb13aCopy full SHA for 36cb13a
packages/auth-services/src/auth-server/middleware/apiKeyGate.express.ts
@@ -21,7 +21,13 @@ export const apiKeyGate =
21
22
// lazy initialise redis based on cfg.redisUrl
23
const url = cfg.redisUrl || process.env['REDIS_URL'];
24
- if (!url) return res.status(500).json({ error: 'redis_not_configured' });
+ if (!url)
25
+ return res
26
+ .status(500)
27
+ .json({
28
+ error:
29
+ 'Redis configuration missing. API key tracking requires Redis to be configured.',
30
+ });
31
const client = getCachedRedisClient() || (await getRedisClient(url));
32
const now = new Date();
33
const trackingKey = `${now.getUTCFullYear()}-${now.getUTCMonth()}-${now.getUTCDate()}:${apiKey}`;
0 commit comments