exceptions
The code in the exceptions.py defines a set of custom exception classes for error handling in Python, specifically for errors that might occur while interacting with the YetiForce API.
1. Base Class: YetiForceError
class YetiForceError(Exception):
pass
- Purpose:
YetiForceErroris a custom base exception class that inherits from Python's built-inExceptionclass. - Usage: This class serves as the root exception for all custom exceptions related to YetiForce errors.
2. Subclass: AuthenticationError
class AuthenticationError(YetiForceError):
pass
- Purpose:
AuthenticationErroris a subclass ofYetiForceErrorand represents an error specifically related to authentication failures. - Usage: This exception would be raised when an authentication-related issue occurs, such as invalid credentials or token failures.