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

Function isPreviewableKey

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

Source from the content-addressed store, hash-verified

435const MAX_PREVIEW_DEPTH = 32;
436
437const 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
444const redactJsonValues = (value: unknown, keyIsPreviewable = false, depth = 0): unknown => {
445 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