I'm using startWithAuthToken function in flow scripting SDK to start an architect session and add a flow. The issue is, If the user (whose token is used) doesn't have Architect > All Permissions then startWithAuthToken function fails but it doesn't throw any exception.
We actually encountered what I believe is the same scenario you're describing in automation tests last Friday. At startup Architect Scripting checks for the architect:ui:view permission and initial investigation looks to be if the user does not have that permission, the code is invoking a generic error handler which ends up throwing but Scripting's internal generic catch error handler is not set up yet.
Additionally, you would not see an error written out to the console in this case either.
We are working on a fix and will let you know when it's out.
We just released Architect Scripting ver. 0.5.6 which has the updated bits to handle the case of a user that does not have the architect:ui:view permission described above.
Can you try installing and let us know if it fixes the issue you described above?
Thanks for the update. Now the error is logged correctly, but the execution still stops when this error is encountered. As mentioned before, when I call startWithAuthToken, the promise returned is not resolved or rejected.
This is how I'm calling it and the flow doesn't reach then or catch.
Thanks a lot, @Ullyot_Jim, that solved the problem.
I was setting flowSession.endTerminatesProcess to false inside the session start callback . So in the case of an error, it wasn't executed since the callback isn't called. Setting it before startWithAuthToken, solved the problem.
Once again, thanks a lot for the help, appreciate it