[WO-606] Catch errors when setting oncert for the tcpsocket object