opentok/opentok-node

generateToken should throw Errors instead of returning null

Closed this issue · 0 comments

returning null assumes that a developer will be checking the return value, which almost never happens in the javascript ecosystem. this type of a mistake is one that is usually encountered in development (the wrong parameters are passed to the method), therefore its reasonable to blow up by throwing an Error.