pnxtech/hydra

_sendMessage should use _reject()

sjmcdowall opened this issue · 2 comments

https://github.com/flywheelsports/hydra/blob/master/index.js#L1364

According to the "specs" for the function, on error(s) the method should call a reject .. but in all instances it actually invokes resolve() with an error message. Besides breaking the contract -- it probably should throw a reject() on errors.

Suspicious lines:

https://github.com/flywheelsports/hydra/blob/master/index.js#L1382

https://github.com/flywheelsports/hydra/blob/master/index.js#L1396

cjus commented

@sjmcdowall the code does what we want. However, the JSDOC should be updated to reflect the usage.

This was fixed in PR#182 ...