When a user try the reset his password and insert a wrong email, the application don't show the message for wrong email.
Motivation for or Use Case
the "password reset init component" is evaluating the "response.message" to validate if it's equal to the string "email address not registered" but the message come as the messages body. (message._body)
Reproduce the error
Just try to reset the password for a wrong email.
Related issues
I didn't found some similar case reported
Suggest a Fix
change the statement from this:
if (response.status === 400 && response.message === 'email address not registered')
to this:
if (response.status === 400 && response._body === 'email address not registered')
in the line 38 of password-reset-init.component.ts
Overview of the issue
When a user try the reset his password and insert a wrong email, the application don't show the message for wrong email.
Motivation for or Use Case
the "password reset init component" is evaluating the "response.message" to validate if it's equal to the string "email address not registered" but the message come as the messages body. (message._body)
Reproduce the error
Just try to reset the password for a wrong email.
Related issues
I didn't found some similar case reported
Suggest a Fix
change the statement from this:
if (response.status === 400 && response.message === 'email address not registered')
to this:
if (response.status === 400 && response._body === 'email address not registered')
in the line 38 of password-reset-init.component.ts
that works for me
JHipster Version(s)
4.6.2
JHipster configuration
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
java version "1.8.0_141" Java(TM) SE Runtime Environment (build 1.8.0_141-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)
git version 2.11.0 (Apple Git-81)
node: v8.2.1
npm: 5.3.0
bower: 1.8.0
gulp: [17:01:02] CLI version 1.3.0
yeoman: 2.0.0
yarn: 0.27.5
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.14.0, build c7bdf9e
Entity configuration(s)
entityName.json
files generated in the.jhipster
directorythe entity configuration is no relevant for this issue
Browsers and Operating System
macOS Sierra 10.12.6