Member Junction
    Preparing search index...

    Function describeGoogleApiError

    • Builds a log-safe, bounded, one-line description of a Google Drive API failure.

      Deliberately an allowlist of named fields rather than a serialisation of the error, for the reason describeBoxError documents in BoxFileStorage.ts: an error raised by an HTTP client carries the originating request, and a request carries whatever authenticated it. Naming the fields makes the logged set a property of this file, which an SDK upgrade cannot widen.

      Exported (rather than private to the driver) only so the extraction can be unit-tested against realistic error payloads — see src/__tests__/googleDriveErrorDetail.test.ts.

      Parameters

      • error: unknown

        The caught value, of unknown shape.

      Returns string

      A human-readable cause, e.g. code 403 — Service Accounts do not have storage quota... — storageQuotaExceeded: ....