catch any error while connecting to service