How to report Postgres custom errors in Ecto Changeset

Capture a Postgres (or any other RDBMS) custom error in the Ecto.Changeset without raising an exception.

This enables you to handle all the errors in one place without braking your aesthetic Elixir functional code with “try/rescue” constructs.

1 Like