From 00cc73397258fc6bfce57011355a736f15f651e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Fri, 23 May 2025 11:29:34 +0200 Subject: [PATCH] more logs --- apps/api/src/routes/v1.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/src/routes/v1.ts b/apps/api/src/routes/v1.ts index b17a7870..d7cc07a1 100644 --- a/apps/api/src/routes/v1.ts +++ b/apps/api/src/routes/v1.ts @@ -92,6 +92,7 @@ function checkCreditsMiddleware( export function authMiddleware( rateLimiterMode: RateLimiterMode, ): (req: RequestWithMaybeAuth, res: Response, next: NextFunction) => void { + const middlewareSpawn = new Error().stack; return (req, res, next) => { (async () => { if (rateLimiterMode === RateLimiterMode.Extract && isAgentExtractModelValid((req.body as any)?.agent?.model)) { @@ -107,7 +108,8 @@ export function authMiddleware( modes: { extract: RateLimiterMode.Extract, extractAgentPreview: RateLimiterMode.ExtractAgentPreview, - } + }, + middlewareSpawn, }); }