microsoft / microsoft/AL

Error: The request failed with code 422, reason: An item with the same key has already been added

Open
#4,833 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement metadata
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
When two extensions are adding fields to the same table, if they use the same ids, you will get this error: Error: The request failed with code 422, reason: An item with the same key has already been added

Describe the solution you'd like
I would like a better error message. It should say the problem is conflicting field ids, in what extension, in what table, in what field. This error was unnecessarily hard to decipher

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the duplicate field-ID validation in the AL compiler or developer tools and reproduce the case with two extensions adding fields to the same table. Done means the 422 error identifies the conflicting field IDs and names the relevant extension, table, and field.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.