err will not exist if res.errmsg exists. The way that the driver handles these admin commands, it basically just passes back the raw results and doesn't do any error checking. I was trying to decide between just passing the res object as the error if res.errmsg exists, but decided to try it like this first.