Function resolveCaughtObjectReportRedactPolicy

  • Validates and freezes a redaction policy; undefined and null both mean "no policy". Call it at startup so a bad policy fails before the first catch block that would use it.

    Parameters

    Returns CorjRedactPolicy | null

    Example

    Corj.resolveCaughtObjectReportRedactPolicy({ keys: ['password'] });
    // { keys: ['password'], paths: [], patterns: [], replacement: '[redacted]', transform: null }
    Corj.resolveCaughtObjectReportRedactPolicy({ patterns: [/sk-\w+/] }); // TypeError: redact.patterns must all be global; …