Skip to content

feature request: include problematic values in UniqueViolationError #13

@good-idea

Description

@good-idea

Right now I'm using the .columns property on UniqueViolationErrors to format some human-readable error messages, i.e. This emailAddress is already in use. It would be great to be able to get the values that violate the constraint as well, to more easily get The emailAddress 'joseph@somewhere.com' is already in use.

Right now I can parse this out of the nativeError.detail property (I'm using PostgreSQL, not sure if this is a property specific to that).

Otherwise ~ thanks for this lib, it's super helpful to have a more structured way to deal with errors :)

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