Add generic error handling (UnknownGenericError in bfxapi/rest/exceptions.py). Add support for new endpoints in _RestAuthenticatedEndpoints class. Extend serializers.py and typings.py.

This commit is contained in:
Davide Casale
2022-12-20 17:48:12 +01:00
parent 7d16c4e4b8
commit 87bb6dc5c7
6 changed files with 154 additions and 14 deletions

View File

@@ -15,16 +15,16 @@ class BfxRestException(BfxBaseException):
pass
class RequestParametersError(BfxRestException):
class ResourceNotFound(BfxRestException):
"""
This error indicates that there are some invalid parameters sent along with an HTTP request.
This error indicates a failed HTTP request to a non-existent resource.
"""
pass
class ResourceNotFound(BfxRestException):
class RequestParametersError(BfxRestException):
"""
This error indicates a failed HTTP request to a non-existent resource.
This error indicates that there are some invalid parameters sent along with an HTTP request.
"""
pass
@@ -34,4 +34,11 @@ class InvalidAuthenticationCredentials(BfxRestException):
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.
"""
pass
class UnknownGenericError(BfxRestException):
"""
This error indicates an undefined problem processing an HTTP request sent to the APIs.
"""
pass