(key: string, insideError: boolean)
| 435 | const MAX_PREVIEW_DEPTH = 32; |
| 436 | |
| 437 | const isPreviewableKey = (key: string, insideError: boolean): boolean => { |
| 438 | const name = key.toLowerCase(); |
| 439 | return ( |
| 440 | PREVIEWABLE_BODY_FIELDS.has(name) || (insideError && PREVIEWABLE_WITHIN_ERROR_FIELDS.has(name)) |
| 441 | ); |
| 442 | }; |
| 443 | |
| 444 | const redactJsonValues = (value: unknown, keyIsPreviewable = false, depth = 0): unknown => { |
| 445 | if (depth > MAX_PREVIEW_DEPTH) return "[redacted]"; |
no outgoing calls
no test coverage detected