You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deleting a group Ecto with sometimes throw a constraint error:
2017-01-30T16:19:53.891 [error] #PID<0.2817.0> running Cog.Endpoint terminated
Server: localhost:4000 (http)
Request: DELETE /v1/groups/589561a5-3391-41f1-91d8-896e8e0f2a62
** (exit) an exception was raised:
** (Ecto.ConstraintError) constraint error when attempting to delete struct:
* foreign_key: user_group_membership_group_id_fkey
If you would like to convert this constraint into an error, please
call foreign_key_constraint/3 in your changeset and define the proper
constraint name. The changeset has not defined any constraint.
(ecto) lib/ecto/repo/schema.ex:417: anonymous fn/4 in Ecto.Repo.Schema.constraints_to_errors/3
(elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
(ecto) lib/ecto/repo/schema.ex:403: Ecto.Repo.Schema.constraints_to_errors/3
(ecto) lib/ecto/repo/schema.ex:347: anonymous fn/9 in Ecto.Repo.Schema.do_delete/4
(ecto) lib/ecto/repo/schema.ex:608: anonymous fn/3 in Ecto.Repo.Schema.wrap_in_transaction/6
(ecto) lib/ecto/adapters/sql.ex:480: anonymous fn/3 in Ecto.Adapters.SQL.do_transaction/3
(db_connection) lib/db_connection.ex:1063: DBConnection.transaction_run/4
(db_connection) lib/db_connection.ex:987: DBConnection.run_begin/3
The text was updated successfully, but these errors were encountered:
When deleting a group Ecto with sometimes throw a constraint error:
The text was updated successfully, but these errors were encountered: