hi. @Sebastian
I’m investigating additional script issues.
I’m sharing a 100% reproducible script.
If you return promiseMethod as a promise, it blocks.
However, if you change it to
await promiseMethod();
it responds normally.
function promiseMethod() {
return new Promise((resolve, reject) => {
getJSON('http://cloud.squidex.io/healthz', (data) => {
reject('test');
}, {}, true);
});
}
async function asyncMethod() {
try {
/* Success Case
return await promiseMethod();
*/
// Blocking
return promiseMethod();
}
catch(ex)
{
throw ex;
}
}
(async () => {
try {
await asyncMethod();
complete()
}
catch(ex)
{
reject(ex);
}
})()