gamesheet_sdk.common.exceptions

Exceptions raised by gamesheet_sdk.

The hierarchy is intentionally small: a single base class so callers can except GameSheetError to catch anything this SDK raises. More specific subclasses will be added as concrete failure modes appear.

Exceptions

AuthenticationError

Raised when authentication against the GameSheet WebUI fails.

GameSheetAPIError

Raised when the GameSheet API returns an HTTP 4xx/5xx error status code.

GameSheetError

Base class for every exception raised by gamesheet_sdk.

GameSheetNotFoundError

Raised when a requested resource is not found (HTTP 404).

GameSheetPermissionError

Raised when access to a resource is forbidden (HTTP 403).

GameSheetRateLimitError

Raised when the client is rate-limited (HTTP 429).

GameSheetValidationError

Raised when client-side parameter validation fails.

exception gamesheet_sdk.common.exceptions.GameSheetError[source]

Bases: Exception

Base class for every exception raised by gamesheet_sdk.

__init__(*args, **kwargs)
classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.AuthenticationError[source]

Bases: GameSheetError

Raised when authentication against the GameSheet WebUI fails.

Covers both missing/incomplete credentials and active server-side rejection (the submit form does not redirect off the sign-in page within the allotted timeout).

__init__(*args, **kwargs)
classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.GameSheetAPIError[source]

Bases: GameSheetError

Raised when the GameSheet API returns an HTTP 4xx/5xx error status code.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code (e.g. 404, 500).

  • endpoint (str) – The API endpoint path that triggered the error.

  • response_body (str | None) – Truncated response body text from the server.

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

__init__(message, status_code, endpoint, response_body=None)[source]

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.GameSheetNotFoundError[source]

Bases: GameSheetAPIError

Raised when a requested resource is not found (HTTP 404).

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

__init__(message, status_code, endpoint, response_body=None)

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.GameSheetPermissionError[source]

Bases: AuthenticationError, GameSheetAPIError

Raised when access to a resource is forbidden (HTTP 403).

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

__init__(message, status_code, endpoint, response_body=None)

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.GameSheetRateLimitError[source]

Bases: GameSheetAPIError

Raised when the client is rate-limited (HTTP 429).

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

__init__(message, status_code, endpoint, response_body=None)

Initialize GameSheetAPIError.

Parameters:
  • message (str) – Context message for error reporting.

  • status_code (int) – The HTTP response status code.

  • endpoint (str) – The API endpoint path.

  • response_body (str | None) – Truncated response body text.

classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception gamesheet_sdk.common.exceptions.GameSheetValidationError[source]

Bases: GameSheetError

Raised when client-side parameter validation fails.

__init__(*args, **kwargs)
classmethod __new__(*args, **kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.