Skip to content

AddComponent method throws Argument exception for duplicate key #2350

@RachitMalik12

Description

@RachitMalik12

The AddComponent method throws an exception if a component with the specified name already exists.
Is this the desired behavior? If so, should it be documented as one of the exceptions the method can throw?

    /home/vscode/.nuget/packages/microsoft.extensions.apidescription.server/10.0.0-preview.4.25229.110/build/Microsoft.Extensions.ApiDescription.Server.targets(67,5): error :  ---> System.ArgumentException: An item with the same key has already been added. Key: ProblemDetails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions