def METHOD_NAME(ws, data):
    try:
        self.on_ws_message(
            {'ws.tunnel': {'ref': ref, 'data': data, 'type': 'octoprint_message'}},
            as_binary=True)
    except:
        self.sentry.captureException()
        ws.close()