Exceptions#

class grad300_client.Grad300Error[source]#

Bases: Exception

Base exception for grad300-client.

class grad300_client.Grad300APIError[source]#

Bases: Grad300Error

Exception raised for API error responses.

status_code#

HTTP status code returned by the backend.

Type:

int

response_body#

Parsed response payload, when available.

Type:

Any | None

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

Initialize API error details.

Parameters:
  • status_code (int) – HTTP status code returned by the backend.

  • message (str) – Human-readable error message.

  • response_body (Any | None, optional) – Parsed response payload.

Return type:

None

class grad300_client.AuthenticationError[source]#

Bases: Grad300APIError

Raised when authentication fails or token is missing/invalid.