MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isPreviewableKey

Function isPreviewableKey

packages/core/sdk/src/oauth-helpers.ts:457–462  ·  view source on GitHub ↗
(key: string, insideError: boolean)

Source from the content-addressed store, hash-verified

455const MAX_PREVIEW_DEPTH = 32;
456
457const 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
464const redactJsonValues = (value: unknown, keyIsPreviewable = false, depth = 0): unknown => {
465 if (depth > MAX_PREVIEW_DEPTH) return "[redacted]";

Callers 2

redactJsonValuesFunction · 0.85
redactTokenEndpointBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected