Skip to content

Upserting an Asset returns 500 on duplicate owners #188

@StewartJingga

Description

@StewartJingga

Describe the bug
When upserting an asset with duplicate owners, Compass returns 5xx with no clear error message.

Sample request payload

{
  "urn": "sample-urn",
  "owners": [
    {
      "uuid": "sample-uuid",
      "email": "[email protected]"
    },
    {
      "uuid": "sample-uuid",
      "email": "[email protected]"
    }
  ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Upsert an Asset with duplicate owners as shown in the example above
  2. Get 5xx error

Expected behavior
When handling duplicate owners, Compass should handle it by either:

  1. Distinct the owner list and return no error
  2. Return 4xx error to indicate that the payload is invalid and let client fix it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions