Skip to content

Users.RolesClient does not throw NotFoundError #999

Description

@pinkfloydx33

Checklist

  • I have looked into the Readme and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

The methods on the Users.RolesClient do not capture the 404 response if the target user does not exist. This surfaces as a ManagementApiException instead of a NotFoundError which is inconsistent with the rest of the SDK

Reproduction

await _client.Users.Roles.ListAsync("invalid", new(), null, default); // throw ManagementApiException 

Additional context

This seems to apply to all of the methods on this client. I didn't check other "subclients" (Sessions, etc) but it's probably worth reviewing

auth0.net version

8.2.0

.NET version

10

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the public API surface.bugThis points to a verified bug in the code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions