Fix change password script.

This commit is contained in:
Mike Cao 2022-01-06 00:49:07 -08:00
parent 6923ea4d1d
commit 2a2ce0e98d
2 changed files with 2 additions and 1 deletions

View file

@ -87,7 +87,7 @@ const getUsernameAndPassword = async () => {
await changePassword(username, password);
console.log('Password changed for user', chalk.greenBright(username));
} catch (error) {
if (error.message.includes('RecordNotFound')) {
if (error.meta.cause.includes('Record to update not found')) {
console.log('Account not found:', chalk.redBright(username));
} else {
throw error;