I have a bulk insert with insert_all
. The destination table has an excluding constraint. At the end of unsuccessful insert operation I have a Postgrex.Error
in my rescue func, Is there any way to adopt this error into something more convenient like changeset error?
The option to make Repo,transaction and insert using
Enum.map(changesets, fn cs ->
repo.insert(cs)
end
is not good I think