Page MenuHomePhabricator

D13578.diff
No OneTemporary

D13578.diff

diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -892,10 +892,23 @@
) {
throw e;
}
- const { message, signature } = await callClaimUsername({
- username,
- password,
- });
+ let message, signature;
+ try {
+ const callClaimUsernameResult = await callClaimUsername({
+ username,
+ password,
+ });
+ ({ message, signature } = callClaimUsernameResult);
+ } catch (claimException) {
+ if (
+ getMessageForException(claimException) === 'invalid_credentials'
+ ) {
+ // This error means the password was incorrect
+ throw new Error('login_failed');
+ } else {
+ throw claimException;
+ }
+ }
result = await registerReservedPasswordUser(
username,
password,

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 11, 12:32 PM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2273112
Default Alt Text
D13578.diff (1 KB)

Event Timeline