You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you define a handler and leave off the third param next, then restify 9 gives the error message:
AssertionError [ERR_ASSERTION]: 'Function' == 'AsyncFunction'
at Chain.add (.../node_modules/restify/lib/chain.js:78:16)
The assertion is meant to distinguish between async and callback handlers, but is misleading in the case of a misdefined callback handler. Also, there's no info in the error about which handler caused the error. The error should say something like:
Handler "getCandy" was expected to either be an async function with two parameters or a callback handler with three parameters (req, res, next).
The text was updated successfully, but these errors were encountered:
Feature Request
Use Case
If you define a handler and leave off the third param
next
, then restify 9 gives the error message:The assertion is meant to distinguish between async and callback handlers, but is misleading in the case of a misdefined callback handler. Also, there's no info in the error about which handler caused the error. The error should say something like:
The text was updated successfully, but these errors were encountered: