diff --git a/core/core.js b/core/core.js index ce83dd8f..3dee1102 100644 --- a/core/core.js +++ b/core/core.js @@ -369,8 +369,8 @@ async function getProcessBlob(blobId, key, options) { } await process.task.execute({name: appSourceName, source: appSource}); } catch (error) { - if (process.app) { - process.app.send({action: 'error', error: error}); + if (process?.task?.onError) { + process.task.onError(error); } else { printError({print: print}, error); }