Fix exception handling in flow setup
Doc string
Allow user defined messages in the flow