Skip to content

Commit 03a03c6

Browse files
Delete HandlerNotFound exception (from bfxapi.websocket.exceptions).
1 parent 63ab433 commit 03a03c6

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

bfxapi/websocket/exceptions.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"WebSocketAuthenticationRequired",
1111
"InvalidAuthenticationCredentials",
1212
"EventNotSupported",
13-
"HandlerNotFound",
1413
"OutdatedClientVersion"
1514
]
1615

@@ -54,12 +53,6 @@ class EventNotSupported(BfxWebSocketException):
5453
This error indicates a failed attempt to subscribe to an event not supported by the BfxWebSocketClient.
5554
"""
5655

57-
58-
class HandlerNotFound(BfxWebSocketException):
59-
"""
60-
This error indicates that a handler was not found for an incoming message.
61-
"""
62-
6356
class OutdatedClientVersion(BfxWebSocketException):
6457
"""
6558
This error indicates a mismatch between the client version and the server WSS version.

bfxapi/websocket/handlers/authenticated_events_handler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from ..exceptions import HandlerNotFound
2-
31
from ...types import serializers
42

53
from ...types.serializers import _Notification
@@ -60,8 +58,6 @@ def handle(self, abbrevation, stream):
6058

6159
return self.event_emitter.emit(event, serializer.parse(*stream))
6260

63-
raise HandlerNotFound(f"No handler found for event of type <{abbrevation}>.")
64-
6561
def __notification(self, stream):
6662
event, serializer = "notification", _Notification(serializer=None)
6763

bfxapi/websocket/handlers/public_channels_handler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from ..exceptions import HandlerNotFound
2-
31
from ...types import serializers
42

53
class PublicChannelsHandler:
@@ -37,8 +35,6 @@ def handle(self, subscription, *stream):
3735
if (channel := subscription["channel"]) and channel in self.__handlers.keys():
3836
return self.__handlers[channel](_clear(subscription, "event", "channel", "chanId"), *stream)
3937

40-
raise HandlerNotFound(f"No handler found for channel <{subscription['channel']}>.")
41-
4238
def __emit(self, event, sub, data):
4339
sub_id, should_emit_event = sub["subId"], True
4440

0 commit comments

Comments
 (0)