This issue is about the demo of promise. It seems that https://github.com/rethinkdb/rethinkdb-example-nodejs/blob/master/todo-angular-express-promise/app.js#L135 and https://github.com/rethinkdb/rethinkdb-example-nodejs/blob/master/todo-angular-express-promise/app.js#L137 can be rejected and since they are not handled by any `.error()` clause, it is likely to throw an error. I think the right way to do is: ``` js ... }).finally(function() { return r.table('todos').indexCreate('createdAt').run(conn); }).finally(function(result) { return r.table('todos').indexWait('createdAt').run(conn) }).then(function(result) { ... ``` Or, are these codes written this way on specific purposes?
This issue is about the demo of promise.
It seems that https://github.com/rethinkdb/rethinkdb-example-nodejs/blob/master/todo-angular-express-promise/app.js#L135 and https://github.com/rethinkdb/rethinkdb-example-nodejs/blob/master/todo-angular-express-promise/app.js#L137 can be rejected and since they are not handled by any
.error()clause, it is likely to throw an error. I think the right way to do is:... }).finally(function() { return r.table('todos').indexCreate('createdAt').run(conn); }).finally(function(result) { return r.table('todos').indexWait('createdAt').run(conn) }).then(function(result) { ...Or, are these codes written this way on specific purposes?