Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review log message returned when creating an unknown exception from ValidationError #2907

Open
iNinja opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
Internal Indicates issue was opened by the IdentityModel team

Comments

@iNinja
Copy link
Contributor

iNinja commented Oct 17, 2024

When implementing a delegate in the new validation model using ValidationParameters, users can return the type of the exception that should be returned when calling GetException() on the ValidationError object.

The library implements the creation of the known and used exception types, but there is a scenario where the user can pass an unknown exception type. In this situation, the library returns a SecurityTokenException instead of the specified type, providing the following message along with the unknown exception type and the original message that was attached to it:

IDX10002: Unknown exception type returned. Type: '{0}'. Message: '{1}'.

We need to review this message to ensure it conveys the right information to users, and possibly create an aka.ms page with more information explaining how they can implement their own ValidationError subclass and override GetException() to return their custom exception.

@iNinja iNinja added the Internal Indicates issue was opened by the IdentityModel team label Oct 17, 2024
@iNinja iNinja self-assigned this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Indicates issue was opened by the IdentityModel team
Projects
None yet
Development

No branches or pull requests

1 participant