Skip to content

Commit c0688b3

Browse files
author
Vladyslav Chygrinov
committed
Wrong error sent
1 parent 0e86783 commit c0688b3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Routers/PublicAPIRouter.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,12 @@ export class PublicAPIRouter extends PromiseRouter {
212212
'Password does not meet the Password Policy requirements.'
213213
) {
214214
throw new Parse.Error(Parse.Error.OTHER_CAUSE, `${result.err}`);
215+
} else {
216+
throw new Parse.Error(
217+
Parse.Error.OTHER_CAUSE,
218+
'Failed to reset password (Username/email or token is invalid)'
219+
);
215220
}
216-
throw new Parse.Error(
217-
Parse.Error.OTHER_CAUSE,
218-
'Failed to reset password (Username/email or token is invalid)'
219-
);
220221
}
221222

222223
return Promise.resolve({

0 commit comments

Comments
 (0)