Is it possible to use javascript Promises in the handlers for cloud script? I could not find any documentaion on this, and my preliminary experiments indicates that it does not work.
Trivial Example:
I would really like to do something like this:
handlers.someHandler = function (args, context) { return Promise.resolve({a: {myResponse: 'hello world'}}) .then(result => { return result.a }) }
Or even nicer:
handlers.someHandler = async function (args, context) { let result = await Promise.resolve({a: {myResponse: 'hello world'}}) return result.a }
Of course, my use-case is a bit more complex than the trivial examples above.