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,