2
0

🔒 (logs) Remove some logs from API response to avoid sensit…

This commit is contained in:
Baptiste Arnaud
2024-01-02 15:18:20 +01:00
parent 7a417c79a5
commit b5fbba7072
5 changed files with 38 additions and 8 deletions

View 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)