Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Unhandled Rejection Error #9

Description

@codinfox

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions