You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
will return correct validation message
{
"Succeeded": false,
"Message": "One or more validation failures have occurred.",
"Errors": [
"Passwords must have at least one digit ('0'-'9').",
"Passwords must have at least one uppercase ('A'-'Z')."
],
"Data": null
}
Desktop (please complete the following information):
OS: MacOS Catalina
Additional context
the problem with throw new ApiException($"{result.Errors}"); it has string constructor.
problem solve when i switch to throw new ValidationException(result.Errors.Select(x => x.Description)); and add another constructor on ValidationException.cs that accept IEnumerable<string> failures.
but i think is that are not acceptable solution because it always return error with header message "Message": "One or more validation failures have occurred.", either that the exception come from IdentityError or database error.
The text was updated successfully, but these errors were encountered:
Describe the bug
Error occurred when register new account when try to give wrong password policy on identity
To Reproduce
add
identityoptions
toservices.AddIdentity
when i try to give password adindaku, will return this response.
Expected behavior
will return correct validation message
Desktop (please complete the following information):
Additional context
the problem with
throw new ApiException($"{result.Errors}");
it has string constructor.problem solve when i switch to
throw new ValidationException(result.Errors.Select(x => x.Description));
and add another constructor onValidationException.cs
that acceptIEnumerable<string> failures
.but i think is that are not acceptable solution because it always return error with header message
"Message": "One or more validation failures have occurred.",
either that the exception come from IdentityError or database error.The text was updated successfully, but these errors were encountered: