Improve error message when last flow form is a vector
Closed this issue · 3 comments
Andre0991 commented
state-flow
won't compile this:
(defflow foo
(flow "consuming `installments-loan.new`"
[:let [as-of #nu/time "2020-01-07T13:00:00Z"]]))
It gets this error:
Unexpected error (AssertionError) macroexpanding cats.core/do-let at (postman/postman/events/update_pv_for_closing_bill.clj:50:7).
Assert failed: Last argument of do-let must not be a vector
(not (vector? (last forms)))
It would be nice if it allowed such forms.
It makes no sense for the test, but it's useful for interactive development.
dchelimsky commented
A flow must return a flow/step, and we don't want to change that semantic. We can, however, improve the error message. Leaving this open until we do.
Andre0991 commented
Hummm, yeah, that makes sense. Thanks.
dchelimsky commented
Addressed in PR #128