Exceptions

All exceptions raised by the library derive from FuelogError.

Hierarchy

FuelogError
├── FuelogAPIError
│   ├── FuelogAuthError        (HTTP 401)
│   ├── FuelogForbiddenError   (HTTP 403)
│   ├── FuelogNotFoundError    (HTTP 404)
│   ├── FuelogValidationError  (HTTP 422)
│   ├── FuelogRateLimitError   (HTTP 429)
│   └── FuelogServerError      (HTTP 5xx)
└── FuelogMCPError

Reference

class fuelog.FuelogError[source]

Bases: Exception

Base exception for all Fuelog errors.

class fuelog.FuelogAPIError(message, status_code=None, response_body=None)[source]

Bases: FuelogError

Raised when the Fuelog API returns an error response.

status_code

The HTTP status code returned by the API.

message

The error message from the API response body.

response_body

The raw response body as a string.

class fuelog.FuelogAuthError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when authentication fails (HTTP 401).

class fuelog.FuelogForbiddenError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when the token lacks the required scope (HTTP 403).

class fuelog.FuelogNotFoundError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when a requested resource does not exist (HTTP 404).

class fuelog.FuelogValidationError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when the request body fails server-side validation (HTTP 422).

class fuelog.FuelogRateLimitError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when the API rate limit is exceeded (HTTP 429).

class fuelog.FuelogServerError(message, status_code=None, response_body=None)[source]

Bases: FuelogAPIError

Raised when the Fuelog server returns a 5xx error.

class fuelog.FuelogMCPError(message, code=None, data=None)[source]

Bases: FuelogError

Raised when the MCP JSON-RPC layer returns an error.

code

The JSON-RPC error code.

data

Optional additional data attached to the error.