2 ms·
It's possible that you could end up with your example as given, but I think you could organize it differently so that it has your handling while also maintainin
by sasmithjr 3y ago
It's possible that you could end up with your example as given, but I think you could organize it differently so that it has your handling while also maintaining the same basic top-level pipeline.
Given what you've specified, I might organize it like:
notify-user:
if (ValidationError, notify-user-validation-error)
or-if (DBError, notify-user-db-error)
try-update-db:
update-db
or-then retry-in-5
or-then retry-remote
try-send-email:
send-email
or-then (requeue-email and ok)
do-root-level-pipeline:
validate
and-then try-update-db
and-then try-send-email
or-then notify-user
I think I correctly mapped the and/or/thens to map/bind, so I hope that makes sense.