catch exception when receive msg from ws