Exceptions API¶
Reference for the custom exception hierarchy raised by the WFRMLS Python client.
Module Reference¶
wfrmls.exceptions ¶
Custom exceptions for WFRMLS API wrapper.
Classes¶
AuthenticationError ¶
AuthenticationError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when authentication fails.
This exception is raised when the bearer token is invalid, missing, or expired, resulting in a 401 Unauthorized response.
Source code in wfrmls/exceptions.py
NetworkError ¶
NetworkError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when network connection fails.
This exception is raised when there are network connectivity issues preventing the request from reaching the API server.
Source code in wfrmls/exceptions.py
NotFoundError ¶
NotFoundError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when a resource is not found.
This exception is raised when the API returns a 404 Not Found, indicating that the requested resource (property, member, etc.) does not exist.
Source code in wfrmls/exceptions.py
RateLimitError ¶
RateLimitError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when rate limit is exceeded.
This exception is raised when the API returns a 429 Too Many Requests, indicating that the client has exceeded the rate limit.
Source code in wfrmls/exceptions.py
ServerError ¶
ServerError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when server returns 5xx error.
This exception is raised when the API returns a 500+ status code, indicating a server-side error that is not caused by the client request.
Source code in wfrmls/exceptions.py
ValidationError ¶
ValidationError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: WFRMLSError
Raised when request validation fails.
This exception is raised when the API returns a 400 Bad Request, indicating that the request parameters or format are invalid.
Source code in wfrmls/exceptions.py
WFRMLSError ¶
WFRMLSError(message: str, status_code: Optional[int] = None, response_data: Optional[Dict[str, Any]] = None)
Bases: Exception
Base exception for all WFRMLS API errors.
This is the base class for all exceptions raised by the WFRMLS API wrapper. All other custom exceptions inherit from this class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | Error message describing what went wrong | required |
status_code | Optional[int] | HTTP status code from the API response | None |
response_data | Optional[Dict[str, Any]] | Raw response data from the API for debugging | None |