(value: unknown)
| 48 | return typeof value === 'object' && value !== null && !Array.isArray(value); |
| 49 | } |
| 50 | function redactUnknown(value: unknown): unknown { |
| 51 | if (typeof value === 'string') { |
| 52 | return redactPathLikeData(value); |
| 53 | } |
| 54 | |
| 55 | if (Array.isArray(value)) { |
| 56 | return value.map((item) => redactUnknown(item)); |
| 57 | } |
| 58 | |
| 59 | if (isRecord(value)) { |
| 60 | const output: Record<string, unknown> = {}; |
| 61 | for (const [key, nested] of Object.entries(value)) { |
| 62 | output[key] = redactUnknown(nested); |
| 63 | } |
| 64 | return output; |
| 65 | } |
| 66 | |
| 67 | return value; |
| 68 | } |
| 69 | |
| 70 | function redactEvent(event: Sentry.ErrorEvent): Sentry.ErrorEvent { |
| 71 | // Remove default identity/request surfaces entirely. |
no test coverage detected