Skip to content

Server methods that return false either synchronously or asynchronously are not handled correctly #5

@cmerchant

Description

@cmerchant

Calling a server method that resolves with a promise that returns a false or a synchronous method that returns false results in unexpected problems. The client does not get the expected false result and instead gets undefined or an unhandled exception. I have created a two unit tests in this project that show the issues. Basically the error we are seeing is,

  1. Client #call should support asynchronous server methods returning boolean false:
    AssertionError: expected undefined to exist

Or in the synchronous case,

(node:3916) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: result.then is not a function
(node:3916) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

See branch falseFix with failing unit test for details.

Pull request submitted

Metadata

Metadata

Assignees

No one assigned

    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