Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning 'undefined' from function of a service causes an error #23

Closed
gear54rus opened this issue Jan 12, 2016 · 0 comments
Closed

Returning 'undefined' from function of a service causes an error #23

gear54rus opened this issue Jan 12, 2016 · 0 comments

Comments

@gear54rus
Copy link
Contributor

This one:

2016-01-12 09:19:37.098 [ERROR][R:08f961] Unknown error while trying to pass the request to instance: TypeError: Cannot read property 'then' of undefined
    at Instance.handleRequest (../../_src/runtime/instance.js:529:28)
    at Endpoint.handleRequest (../../_src/runtime/endpoint.js:483:21)
    at ../../_src/runtime/router.js:347:21
    at Router._handleRequest (../../_src/runtime/router.js:348:8)
    at Server.<anonymous> (../../_src/runtime/router.js:197:14)
    at emitTwo (events.js:87:13)
    at Server.emit (events.js:172:7)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:529:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)

If undefined is returned, it shouldn't even bother with checking if it's a promise.

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

No branches or pull requests

1 participant