Skip to content

Unique constraint exception is not translated properly #256

@jpmoral

Description

@jpmoral

When a unique constraint is violated the exception is translated as Statement Invalid. This is because the case statement in the translate_exception method doesn't handle the "violation of unique key constraint" message.
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/lib/active_record/connection_adapters/sqlserver_adapter.rb#L390

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