Improper error message when password policy is not adhered

Description

The error message which was thrown when the password policy was not adhered to was ambiguous. I have fixed the error message and now the error rightly shows what mistake the user is making while entering the password.

Environment

None

Activity

Show:
Nikhil Pawar
May 26, 2016, 5:59 AM

Changed : this.userMessageGlobalisationCode = globalisationMessageCode;
to
this.userMessageGlobalisationCode = defaultUserMessage;
Now, the error message rightly depicts the mistake the user is making while entering new password.
File changed:
org.apache.fineract.infrastructure.core.data.ApiParameterError

Constructor modified:
private ApiParameterError(final String globalisationMessageCode, final String defaultUserMessage, final Object[] defaultUserMessageArgs) {
// this.userMessageGlobalisationCode = globalisationMessageCode;
this.userMessageGlobalisationCode = defaultUserMessage;
this.developerMessage = defaultUserMessage;
this.defaultUserMessage = defaultUserMessage;

final List<ApiErrorMessageArg> messageArgs = new ArrayList<>();
if (defaultUserMessageArgs != null) {
for (final Object object : defaultUserMessageArgs) {
messageArgs.add(ApiErrorMessageArg.from(object));
}
}
this.args = messageArgs;

this.parameterName = "id";
}

Assignee

Nikhil Pawar

Reporter

Nikhil Pawar

Labels

None

Implementation Priority

Must

URL

None

Story Points

None

Team

Core

productboard URL

None

Man Day Estimate

None

Components

Priority

Minor
Configure