Update mySocket.js

add error event