So you're using the ble_http module and getting an unhandled promise rejection on the Bangle?
ble_http
You should just be able to do:
require("ble_http").httpRequest(device, "pur3.co.uk/hello.txt", function(d) { response=JSON.stringify(d); print(response); }).catch(function(err) { // error here });
But if that fails, there is also the uncaughtException event, but I'd advise against using that unless there is no other option: http://www.espruino.com/Reference#l_process_uncaughtException
uncaughtException
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
So you're using the
ble_http
module and getting an unhandled promise rejection on the Bangle?You should just be able to do:
But if that fails, there is also the
uncaughtException
event, but I'd advise against using that unless there is no other option: http://www.espruino.com/Reference#l_process_uncaughtException