(key: string, insideError: boolean)
| 455 | const MAX_PREVIEW_DEPTH = 32; |
| 456 | |
| 457 | const isPreviewableKey = (key: string, insideError: boolean): boolean => { |
| 458 | const name = key.toLowerCase(); |
| 459 | return ( |
| 460 | PREVIEWABLE_BODY_FIELDS.has(name) || (insideError && PREVIEWABLE_WITHIN_ERROR_FIELDS.has(name)) |
| 461 | ); |
| 462 | }; |
| 463 | |
| 464 | const redactJsonValues = (value: unknown, keyIsPreviewable = false, depth = 0): unknown => { |
| 465 | if (depth > MAX_PREVIEW_DEPTH) return "[redacted]"; |
no outgoing calls
no test coverage detected