Exceptions¶
spindlex.exceptions ¶
SpindleX Exception Hierarchy
Defines all exceptions used throughout the SpindleX with a unified hierarchy for consistent error handling and reporting.
Classes¶
AuthenticationException ¶
Bases: SSHException
Authentication failed.
Raised when SSH authentication fails for any reason including invalid credentials, unsupported auth methods, or auth timeouts.
Source code in spindlex/exceptions.py
BadHostKeyException ¶
Bases: SSHException
Host key verification failed.
Raised when the server's host key doesn't match expected values or when host key verification fails according to the configured policy.
Source code in spindlex/exceptions.py
ChannelException ¶
Bases: SSHException
Channel operation failed.
Raised when SSH channel operations fail including channel creation, data transmission, or channel state management errors.
Source code in spindlex/exceptions.py
ConfigurationException ¶
Bases: SSHException
Configuration error.
Raised when SpindleX configuration is invalid or incomplete.
Source code in spindlex/exceptions.py
CryptoException ¶
Bases: SSHException
Cryptographic operation failed.
Raised when cryptographic operations fail including key generation, encryption/decryption, or signature verification.
Source code in spindlex/exceptions.py
IncompatiblePeer ¶
Bases: SSHException
Incompatible SSH peer.
Raised when the remote SSH peer is incompatible with this implementation.
Source code in spindlex/exceptions.py
ProtocolException ¶
Bases: SSHException
SSH protocol violation.
Raised when SSH protocol violations are detected including malformed messages, invalid state transitions, or unsupported operations.
Source code in spindlex/exceptions.py
SFTPError ¶
Bases: SSHException
SFTP operation failed.
Raised when SFTP file operations fail. Includes SFTP-specific error codes matching the SFTP specification.
Source code in spindlex/exceptions.py
Methods:¶
from_status(status_code, message='', filename=None) classmethod ¶
Create SFTPError from SFTP status code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code | int | SFTP status code | required |
message | str | Optional error message | '' |
filename | Optional[str] | Optional filename context | None |
Returns:
| Type | Description |
|---|---|
SFTPError | SFTPError instance with appropriate message |
Source code in spindlex/exceptions.py
SSHException ¶
Bases: Exception
Base exception for all SSH-related errors.
All SpindleX exceptions inherit from this base class to provide a unified exception hierarchy for error handling.
Source code in spindlex/exceptions.py
TimeoutException ¶
Bases: SSHException
Operation timed out.
Raised when SSH operations exceed configured timeout values.
Source code in spindlex/exceptions.py
TransportException ¶
Bases: SSHException
Transport layer error.
Raised when SSH transport layer operations fail including connection establishment, protocol negotiation, or packet handling.