@backblaze-labs/b2-mcp
    Preparing search index...

    Function safeErrorText

    • Render an error message with the given request-header secrets redacted. Exact redaction covers short values the generic sanitizer skips; the sanitizer then handles configured env secrets and labeled/bearer patterns. Any failure while coercing or sanitizing the error text returns the sanitizer-failure sentinel so the HTTP catch blocks that call this cannot throw a secondary exception.

      Parameters

      • err: unknown

        Error or thrown value to format.

      • secrets: readonly string[]

        Exact request-secret values to redact.

      Returns string

      The redacted error text, or the sanitizer-failure sentinel on error.