Skip to content

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

feat: debug log for auth errors

Marc Klingen81e9ac0ceac1
diff --git a/src/features/public-api/server/apiAuth.ts b/src/features/public-api/server/apiAuth.ts
index 2a1874fe30..643b696fdd 100644
--- a/src/features/public-api/server/apiAuth.ts
+++ b/src/features/public-api/server/apiAuth.ts
@@ -125,6 +125,9 @@ async function findDbKeyOrThrow(publicKey: string) {
const dbKey = await prisma.apiKey.findUnique({
where: { publicKey },
});
- if (!dbKey) throw new Error("Invalid public key");
+ if (!dbKey) {
+ console.log("No api key found for public key:", publicKey);
+ throw new Error("Invalid public key");
+ }
return dbKey;
}