Struggling to understand why the agent scripting console throws an ‘Unhandled Promise Rejection’ when invoking the custom action defined in Architect. The flow executes successfully in the simulator, but the dashboard fails to render the script step during live interactions.
Thank you for your assistance.
This is typically caused by the custom action returning a non-promise value or failing to resolve properly. The dashboard expects a strict promise chain. Check the JavaScript implementation for missing return statements.
Ensure the function resolves correctly. The simulator might mask async errors. Verify the action definition in Architect matches the actual code.
return new Promise((resolve, reject) => {
// logic
resolve();
});