mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2026-02-08 15:24:21 +01:00
Add ZeroConnectionsError in bfxapi.websocket.exceptions. Add log if connections = 0 in BfxWebsocketClient::start. Add raise ZeroConnectionError in BfxWebsocketClient::subscribe if connections equals 0.
This commit is contained in:
@@ -5,9 +5,11 @@ __all__ = [
|
||||
|
||||
"ConnectionNotOpen",
|
||||
"TooManySubscriptions",
|
||||
"ZeroConnectionsError",
|
||||
"WebsocketAuthenticationRequired",
|
||||
"InvalidAuthenticationCredentials",
|
||||
"EventNotSupported",
|
||||
"HandlerNotFound",
|
||||
"OutdatedClientVersion"
|
||||
]
|
||||
|
||||
@@ -26,29 +28,33 @@ class TooManySubscriptions(BfxWebsocketException):
|
||||
This error indicates a subscription attempt after reaching the limit of simultaneous connections.
|
||||
"""
|
||||
|
||||
class ZeroConnectionsError(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates an attempt to subscribe to a public channel while the number of connections is 0.
|
||||
"""
|
||||
|
||||
class WebsocketAuthenticationRequired(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates an attempt to access a protected resource without logging in first.
|
||||
"""
|
||||
|
||||
class InvalidAuthenticationCredentials(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.
|
||||
"""
|
||||
|
||||
class EventNotSupported(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates a failed attempt to subscribe to an event not supported by the BfxWebsocketClient.
|
||||
"""
|
||||
|
||||
class OutdatedClientVersion(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates a mismatch between the client version and the server WSS version.
|
||||
"""
|
||||
|
||||
|
||||
class InvalidAuthenticationCredentials(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.
|
||||
"""
|
||||
|
||||
|
||||
class HandlerNotFound(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates that a handler was not found for an incoming message.
|
||||
"""
|
||||
|
||||
class OutdatedClientVersion(BfxWebsocketException):
|
||||
"""
|
||||
This error indicates a mismatch between the client version and the server WSS version.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user