feat: better error notification for dynamic secret

This commit is contained in:
=
2025-08-07 20:37:05 +05:30
parent 1ad02e2da6
commit adb3185042
20 changed files with 1098 additions and 460 deletions
+8
View File
@@ -19,3 +19,11 @@ export const prefixWithSlash = (str: string) => {
const vowelRegex = new RE2(/^[aeiou]/i);
export const startsWithVowel = (str: string) => vowelRegex.test(str);
export const sanitizeString = (dto: { unsanitizedString: string; tokens: string[] }) => {
let sanitizedString = dto.unsanitizedString;
dto.tokens.filter(Boolean).forEach((el) => {
sanitizedString = sanitizedString.replaceAll(el, "[REDACTED]");
});
return sanitizedString;
};