From 1c90df9dd4be54a99a1e74885a69576f6c4589bb Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Fri, 12 Apr 2024 10:34:59 -0400 Subject: [PATCH] add log for secrets depth breakout --- backend/src/services/secret/secret-fns.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/services/secret/secret-fns.ts b/backend/src/services/secret/secret-fns.ts index 5f0c445ba..2bfda2cbe 100644 --- a/backend/src/services/secret/secret-fns.ts +++ b/backend/src/services/secret/secret-fns.ts @@ -21,6 +21,7 @@ import { } from "@app/lib/crypto"; import { BadRequestError } from "@app/lib/errors"; import { groupBy, unique } from "@app/lib/fn"; +import { logger } from "@app/lib/logger"; import { ActorAuthMethod, ActorType } from "../auth/auth-type"; import { getBotKeyFnFactory } from "../project-bot/project-bot-fns"; @@ -115,6 +116,7 @@ const generatePaths = ( // We make sure that the recursion depth doesn't exceed 20. // We do this to create "circuit break", basically to ensure that we can't encounter any potential memory leaks. if (currentDepth >= 20) { + logger.info(`generatePaths: Recursion depth exceeded 20, breaking out of recursion [map=${JSON.stringify(map)}]`); return; } // Recursively generate paths for children, passing down the formatted path