Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider short-circuiting in case a sync processor returns js/Error #29

Open
arichiardi opened this issue Feb 20, 2019 · 0 comments
Open

Comments

@arichiardi
Copy link
Owner

This is a tough one and I haven't made up my mind yet.

Basically the use case is that, let's say we have a processor that instead of throwing a js/Error just returns it, like:

(defn validate-data
  [ctx]
  (let [data (:some-data ctx)
        spec ::some/spec]

    (if (not (s/valid? spec data))
      (ex-info "Invalid data" {})
      data)))

Then fonda at the moment does not short-circuits and errors out. We only short circuit in case of anomaly data.

Maybe it makes sense but I just want to note this down for future reference.

Also, should it write this in the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant