Skip to content

Exceptions

All exceptions inherit from PyhoodError and can be caught at any level of the hierarchy.

pyhood.exceptions

hood exceptions — clear error types instead of silent failures.

PyhoodError

Bases: Exception

Base exception for all hood errors.

AuthError

Bases: PyhoodError

Authentication failed.

LoginTimeoutError

Bases: AuthError

Login hung — likely waiting for device approval.

TokenExpiredError

Bases: AuthError

Stored session token has expired.

DeviceApprovalRequiredError

Bases: AuthError

Robinhood is requesting device approval via the mobile app.

MFARequiredError

Bases: AuthError

Multi-factor authentication code required.

RateLimitError

Bases: PyhoodError

Too many requests — slow down.

APIError

Bases: PyhoodError

Robinhood API returned an error.

OrderError

Bases: PyhoodError

Order placement or modification failed.

SymbolNotFoundError

Bases: PyhoodError

Ticker symbol not recognized.