Flask-SocketIO
Flask-SocketIO copied to clipboard
How to create error handler in Class based Namespace
Hello, I am trying to use a class based namespace and would like to have my error handler in that class, I have a function named on_error(self, e)
as well as trying on_error_default(self, e)
but neither seem to work, is there any way to have the error handler in the class?
Errors are not dispatched to class based namespaces at this time. You can workaround this limitation by creating an error handler that invokes the on_error()
method in your namespace.
It's a good feature, though.
@codyleyhan @miguelgrinberg any updates on this issue since https://github.com/miguelgrinberg/Flask-SocketIO/pull/834 was closed last summer? I'm attempting to implement error handling in the on_connect
of a custom namespace and think I'm running into this issue.
@joshbriegal no updates. The PR was incomplete and the author did not respond to my feedback.