Skip to content

Does not support unique_constraint properly #173

Closed

Description

@jdebsucks

The Ecto.Changeset.unique_constraint is supposed to catch the Database error thrown when a unique key is violated. However this adapter does not seem to work. This is (part of) the logged error: ** (exit) an exception was raised:, ** (Tds.Error) Line 1 (Error 2627): Violation of UNIQUEKEY``. This is not caught by ecto properly and does not work. Not sure if the issue is this adapter or ecto but I figured I'd start here.

Activity

  1. mjaric commented on Sep 15, 2025

    @mjaric
    Member

    I will check but I think this should be adapter issue probably. As I remeber i made macro that wraps around errors so error code and messages are captured correctly if en-US language is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions