Hello,
I am using angular-sails to connect my Node Server to an ionic application through Socket.io.
Its very functionnal and useful, Thanks ! ;)
But, if the server is down, i have this error :
WebSocket connection to 'ws://myapi.com:1337/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=browser&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I was not able to found any information if its possible to catch the error. Actually, if the server is down, this make crashing my app because of this error.. Is there a way to detect the error ? I mean, when I use Promises, I have the success callback which is triggered in case of 200 http response and error callbacks which are triggered in case of 404/502 errors, but the error callback is not triggered when the server is down.
Am I wrong on something ?
thank you
Hello,
I am using angular-sails to connect my Node Server to an ionic application through Socket.io.
Its very functionnal and useful, Thanks ! ;)
But, if the server is down, i have this error :
WebSocket connection to 'ws://myapi.com:1337/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=browser&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I was not able to found any information if its possible to catch the error. Actually, if the server is down, this make crashing my app because of this error.. Is there a way to detect the error ? I mean, when I use Promises, I have the success callback which is triggered in case of 200 http response and error callbacks which are triggered in case of 404/502 errors, but the error callback is not triggered when the server is down.
Am I wrong on something ?
thank you