mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-18 19:32:20 -06:00
feat: WebSocket service for event and connection management
This commit is contained in:
38
env/lib/python3.10/site-packages/socketio/exceptions.py
vendored
Normal file
38
env/lib/python3.10/site-packages/socketio/exceptions.py
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
class SocketIOError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ConnectionError(SocketIOError):
|
||||
pass
|
||||
|
||||
|
||||
class ConnectionRefusedError(ConnectionError):
|
||||
"""Connection refused exception.
|
||||
|
||||
This exception can be raised from a connect handler when the connection
|
||||
is not accepted. The positional arguments provided with the exception are
|
||||
returned with the error packet to the client.
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
if len(args) == 0:
|
||||
self.error_args = {'message': 'Connection rejected by server'}
|
||||
elif len(args) == 1:
|
||||
self.error_args = {'message': str(args[0])}
|
||||
else:
|
||||
self.error_args = {'message': str(args[0])}
|
||||
if len(args) == 2:
|
||||
self.error_args['data'] = args[1]
|
||||
else:
|
||||
self.error_args['data'] = args[1:]
|
||||
|
||||
|
||||
class TimeoutError(SocketIOError):
|
||||
pass
|
||||
|
||||
|
||||
class BadNamespaceError(SocketIOError):
|
||||
pass
|
||||
|
||||
|
||||
class DisconnectedError(SocketIOError):
|
||||
pass
|
||||
Reference in New Issue
Block a user