[docs]classUnauthorizedException(DataSolutionsSDKException):"""Exception for 401 Unauthorized."""
[docs]def__init__(self,message="Unauthorized. Check your API Key."):super().__init__(message,status_code=401,)
[docs]classForbiddenException(DataSolutionsSDKException):"""Exception for 403 Forbidden."""
[docs]def__init__(self,message="Forbidden. Contact Data Solutions if you believe you should have access to this endpoint/data.",):super().__init__(message,status_code=403,)
[docs]classValueException(DataSolutionsSDKException):"""Exception for the API returning an unexpected response."""
[docs]def__init__(self,message="Invalid selection was made."):super().__init__(message,status_code=400,)
[docs]classNotFoundException(DataSolutionsSDKException):"""Exception for 404 Not Found."""
[docs]def__init__(self,message="Not Found. Is your query correct?"):super().__init__(message,status_code=404,)
[docs]classInternalServerException(DataSolutionsSDKException):"""Exception for 500 Internal Server Error."""
[docs]def__init__(self,message="Internal Server Error"):super().__init__(message,status_code=500,)
[docs]classRateLimitExceededException(DataSolutionsSDKException):"""Exception for 429 Rate Limit Exceeded."""
[docs]def__init__(self,message="An unhandled exception occured. Please contact the Data Solutions Team.",details="",):super().__init__((message,details))