GSAB
Docs · v0.4.0

Errors & exceptions

Every GSAB exception subclasses GSABError, so you can catch one type and read a plain-language, actionable message.

from gsab import GSABError, AuthError, NotFoundError, ValidationError

try:
    await db.query("SELECT bogus")
except ValidationError as e:
    ...        # bad query / record / argument (also a ValueError)
except AuthError as e:
    ...        # not signed in; message says: run `gsab auth login`
except GSABError as e:
    ...        # anything else GSAB-related
ExceptionMeaning / what to do
AuthErrorNot authenticated, or the saved session expired/was revoked → run gsab auth login.
ConnectionErrorCould not reach Google (network drop/timeout). Check your connection.
NotFoundErrorThe spreadsheet or tab does not exist. Check the id and tab name.
PermissionDeniedErrorThe account may not access the spreadsheet, or the scope wasn't granted.
QuotaExceededErrorRate limit / quota hit. GSAB retries 429/5xx with backoff; try again later.
ValidationErrorA record, filter, argument or query was rejected (also a ValueError).
APIErrorAn unexpected Google Sheets API error.

GSAB automatically retries transient failures (429, 5xx, dropped connections, timeouts) with exponential backoff before raising.