Fixed #307 - Regression unhandled error
In 6a345b83, we added a regression as sendMessage()
was previously chained with then().catch()
allowing us to handle errors in such call, while the rewritten code is not able to do so. This MR moves sendMessage()
to the respective try
block.