subscription: fix unsubscrbe

This commit is contained in:
Jacob Plaster
2019-01-04 16:37:00 +00:00
parent d5dcf3cf80
commit a22d43a0e0
4 changed files with 7 additions and 4 deletions

View File

@@ -194,7 +194,10 @@ class BfxWebsocket(GenericWebsocket):
await self.subscriptionManager.confirm_unsubscribe(data)
async def _system_error_handler(self, data):
self._emit('error', data)
err_string = ERRORS[data.get('code', 10000)]
err_string = "{} - {}".format(ERRORS[data.get('code', 10000)],
data.get("msg", ""))
self._emit('error', Exception(err_string))
async def _system_auth_handler(self, data):
if data.get('status') == 'FAILED':