Skip to content

Add more context to the non-unique array item in error #1363

Description

@yuri1969

Resolving validation errors caused by array items defined as unique requires post-processing the result to find the dups.

To illustrate, a validation of an array with 100s of items results in vague error of:

<array> has non-unique elements


Enriching ValidationError with additional exact context as an index/duplicated item would help a lot.

Activity

  1. Julian commented on Jun 6, 2025

    @Julian
    Member

    This isn't likely to happen unless #517 happens, as right now we don't calculate this information (and doing so isn't strictly necessary to know the list contains duplicates). But given that #517 may indeed happen some day I'm happy to leave this open to consider at that point.

  2. added
    Error ReportingIssues related to clearer or more robust validation error reporting
    on Jun 6, 2025
  3. added theissue type on Jun 6, 2025
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

    Error ReportingIssues related to clearer or more robust validation error reporting

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions