Skip to content

[Bug]: Incorrect error handling Get-AdoUserEntitlement cmdlet #128

@Antiohne

Description

@Antiohne

Is there an existing issue for this?

  • I have searched the existing issues

PowerShell version

7.5.4

Azure.DevOps.PSModule version

0.40

Related function

Get-AdoUserEntitlement

Input arguments of the related function

Any GUID of a user account which is not present in the Azure DevOps environment given as an argument to the UserId parameter.

Debug output

Expected behavior

A PSCustomObject with the user entitlement details of the user.

Actual behavior

An error message Write-Error: Response status code does not indicate success: 500 (Internal Server Error). .

The inner exception is of type UserEntitlementNotFoundException with the message User entitlement not found for ID {GUID} .

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    in pr 👉This is when an issue is due because a pull request is still open

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions