[cli] Fix arguments for flow factory functions

Import pumphouse-specific exceptions and use them correctly.
This commit is WIP.