https://github.com/mongodb/mongo/blob/master/src/mongo/shell/collection.js#L1032
throw _getErrorWithCode(ret, "listIndexes failed: " + tojson(res));
should be
throw _getErrorWithCode(res, "listIndexes failed: " + tojson(res));
https://github.com/mongodb/mongo/blob/master/src/mongo/shell/collection.js#L1032
throw _getErrorWithCode(ret, "listIndexes failed: " + tojson(res));
should be
throw _getErrorWithCode(res, "listIndexes failed: " + tojson(res));