Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: on cache schema change, delete cached api keys (#4527)

Marc Klingen39539300c1c9
diff --git a/web/src/features/public-api/server/apiAuth.ts b/web/src/features/public-api/server/apiAuth.ts
index ca4427d76f..6f7bb56ec1 100644
--- a/web/src/features/public-api/server/apiAuth.ts
+++ b/web/src/features/public-api/server/apiAuth.ts
@@ -342,7 +342,11 @@ export class ApiAuthService {
}
if (!parsedApiKey.success) {
- logger.error("Failed to parse API key from Redis:", parsedApiKey.error);
+ logger.error(
+ "Failed to parse API key from Redis, deleting existing key from cache",
+ parsedApiKey.error,
+ );
+ await this.redis.del(this.createRedisKey(hash));
}
return null;
} catch (error: unknown) {