Emit connection errors properly