Client starts looping requests when response is malformed or not sse
Superpat opened this issue · comments
So I've noticed that if I make mistakes in my sse events and data-star cant understand them, it will start looping the original request without end. This also happens if the server responds with something else than sse. I'm thinking this is related to the reconnect handling needed to be able to handle initiating sse requests from a post like mentioned in https://data-star.dev/docs/streaming_backend#sse-backend-fetch-on-the-frontend
I think this behavior is a bug but maybe it's working as intended ? It sure is annoying though, since the requests will keep looping until I reload the client and that means I lose the network inspection logs.
It's part of the SSE retry contract, BUT if you see that then please debug the backend plugin and let's get better docs in the form of throwing better/specific errors.
Might try latest, 0.15.3. I've updated the expression eval to have more explicit error handling