Errors
Every failure raises a subclass of BhoonidhiError, so a single except
BhoonidhiError catches anything the SDK can throw. Each subclass also keeps its
matching built-in base (ValueError, LookupError, RuntimeError), so
existing handlers for those still work.
from bhoonidhi_downloader.sdk import BhoonidhiError
try:
client.query.download("misty-falcon", "./downloads")
except BhoonidhiError as e:
print("failed:", e)
| Exception | Raised when | Built-in base |
|---|---|---|
BhoonidhiError |
Base class for all of the below | Exception |
BhoonidhiAuthError |
Not logged in, or credentials rejected | Exception |
BhoonidhiValidationError |
A bad argument (empty login, unknown filter, malformed select) |
ValueError |
BhoonidhiNotFoundError |
An unknown query slug or scene | LookupError |
BhoonidhiAPIError |
The portal returned an error or an unexpected response | RuntimeError |
BhoonidhiError
Bases: builtins.Exception
Base class for every error this package raises.
Catch this to handle any Bhoonidhi failure in one place. The
subclasses below also keep their matching built-in base (ValueError,
LookupError, ...) so existing except ValueError style handlers
keep working.
BhoonidhiAuthError
Bases: bhoonidhi_downloader.exceptions.BhoonidhiError
Raised when authentication or session validation against Bhoonidhi fails.
BhoonidhiValidationError
Bases: bhoonidhi_downloader.exceptions.BhoonidhiError, builtins.ValueError
Raised when a satellite/sensor combination or other input is invalid.
BhoonidhiNotFoundError
Bases: bhoonidhi_downloader.exceptions.BhoonidhiError, builtins.LookupError
Raised when a requested scene or record cannot be found.
BhoonidhiAPIError
Bases: bhoonidhi_downloader.exceptions.BhoonidhiError, builtins.RuntimeError
Raised when a Bhoonidhi API request fails or returns an unexpected payload.