🔒 (logs) Remove some logs from API response to avoid sensit…
This commit is contained in:
20
packages/bot-engine/logs/filterPotentiallySensitiveLogs.ts
Normal file
20
packages/bot-engine/logs/filterPotentiallySensitiveLogs.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
sendEmailErrorDescription,
|
||||
sendEmailSuccessDescription,
|
||||
} from '../blocks/integrations/sendEmail/executeSendEmailBlock'
|
||||
import {
|
||||
webhookErrorDescription,
|
||||
webhookSuccessDescription,
|
||||
} from '../blocks/integrations/webhook/executeWebhookBlock'
|
||||
|
||||
export const filterPotentiallySensitiveLogs = (log: {
|
||||
status: string
|
||||
description: string
|
||||
details?: unknown
|
||||
}) =>
|
||||
![
|
||||
webhookErrorDescription,
|
||||
webhookSuccessDescription,
|
||||
sendEmailErrorDescription,
|
||||
sendEmailSuccessDescription,
|
||||
].includes(log.description)
|
||||
Reference in New Issue
Block a user