fix ws error throw