Exceptions and Exception Handling¶
BuycoinsException¶
This is the base exception class from which other classes inherit. Every exception raised by the Buycoins Python SDK will inherit this class and that makes it easier to spot Buycoins-related exceptions.
Also note that not every possible error that can be raised by the Buycoins SDK has a corresponding Exception class, only a select few do. However, other errors without an exception class will still raise a regular BuycoinsException.
BuycoinsHTTPException¶
status_code [int]: an integer representing the status code of the HTTPError
response [requests.Response]: the HTTP Response from the HTTPError
error_message [str]: the error message from the HTTPError
This exception is usually raised when you try to access the Buycoins API with incorrect or invalid API keys or when an internal server error occurs.