cypriss / mutations

Compose your business logic into commands that sanitize and validate input.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The mutation name in `ValidationException`

am-kantox opened this issue · comments

Imagine the following code:

begin
  MutationA.run! params
  MutationB.run! params
rescue ValidationException => e
  ...
end

It would be really fine to have a quick access to the cause of the error, like a mutation name. At the moment, everything we got there is the Outcome instance, wrapped with ValidationException.

In fact, the back-reference to the mutation might be useful in many other cases.