SERVER-5442: need to resetError before doing the prepare