MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / redactUnknown

Function redactUnknown

src/utils/sentry.ts:50–68  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

48 return typeof value === 'object' && value !== null && !Array.isArray(value);
49}
50function 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
70function redactEvent(event: Sentry.ErrorEvent): Sentry.ErrorEvent {
71 // Remove default identity/request surfaces entirely.

Callers 2

redactEventFunction · 0.85
redactLogFunction · 0.85

Calls 2

redactPathLikeDataFunction · 0.85
isRecordFunction · 0.70

Tested by

no test coverage detected