Miguel Grinberg
Miguel Grinberg
@sgavil Your question makes me think that you think APIFairy somehow prevents you from returning an error response based on a schema. This is actually incorrect, you can return anything...
@sersorrel You can create your own custom authentication decorator that passes all its arguments through to `apifairy.authenticate` and also includes `apifairy.other_responses` with the set of canned error responses you'd like...
@sgavil Yes, you should return your error responses in an error handler, not in the route function.
This example does not require authentication. You can look at the documentation for the Socket.IO JS client, and the Python server to see how to pass authentication. Client docs: https://socket.io/docs/v4/client-api/#iourl...
This is likely a problem in your application. Could you please share a simple client and server that reproduce this problem?
The logs do not show that you have initiated a disconnection, they show that the client lost the connection to the server, and for that reason it is attempting to...
Let me see if I understand. You got disconnected from the server, and while the client was in the process of reconnecting you called `disconnect()`? And your expectation is that...
@vipcxj correct, the disconnect reason is not being exposed to the disconnect handler. I have never got around to expose that. Will think about how to best do this.
The thing is, calling disconnect when you are disconnected doesn't do anything, since you are already disconnected. There is currently no way to interrupt a reconnect loop, but there are...
As I said, I will think about how to interrupt a reconnect loop.