So,
When you run Repo.transaction(), your Multi runs. This will return a map like this:
%{:ok, %{record: record, update_book: result}}
You can use this tuple un an case. For example check this post:
This example does not apply to your actual code.
Hope this helps.
Best regards,
4 Likes