ash-project / splode

Aggregatable and consistent errors for Elixir
MIT License
15 stars 4 forks source link

Modifications to merge logic #9

Closed zachdaniel closed 4 months ago

zachdaniel commented 4 months ago

Contributor checklist

zachdaniel commented 4 months ago

@pinetops In an effort not to lose your work, this PR is made with your original commit retained :)

Now, we can modify ash and reactor to have merge_with: [Reactor.Error] and merge_with: [Ash.Error] respectively, and this should have the behavior you want.

I did add some flattening logic, but I think what I've added is a bit simpler overall, and only has to happen when an error class is produced.

pinetops commented 4 months ago

Wonderful. Thankyou!