Emit error on connection error