XDataWebConnection and XDataWebClient server down


I did this steps described below:

1) XData server started
2) From WebApplication I did TXDataWebConnection.open() (connected is true)
3) XData server down
4) TXDataWebConnection.connected is still true
5) I send via TXDataWebClient.RawInvoke but I didin't get an error despite the XDataServer is down

Why? How can I check if my XDataServer connection is still alive if I didn't get any error for death connection?


True value in TXDataWebConnection.Connected property means the server was once connected and the meta model has been loaded. So further connections can be done (the meta model is needed). Since XData is a stateless REST server, it doesn't make sense to interpret it as the "connection is active".

But if XData server is down, you should get errors from RawInvoke. Note that you always have to check browser console to check for errors. Web applications show errors there, especially on async operations like server requests, you won't get display messages. Check browser console and/or check OnError event in TXDataWebClient and TXDataWebConnection to see if you get something there.
You're right, on console I got this warning information:

The FetchEvent for "" resulted in a network error response: an object that was not a Response was passed to respondWith().

How can I catch this kind of console warning on my app code?


Look at the events of TXDataWebConnection and XDataWebClient. They both have OnError events.