Skip to content

Commit 80dc6c8

Browse files
30179: resetPassword mutation returns generic error - added API-functional test
1 parent 2c26f7a commit 80dc6c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/ResetPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function resolve(
118118
$args['newPassword']
119119
);
120120
} catch (LocalizedException $e) {
121-
throw new GraphQlInputException(__('The password must be at least 8 characters long, minimum of 3 different classes of characters: Lower Case, Upper Case, Digits, Special Characters.'), $e);
121+
throw new GraphQlInputException(__($e->getMessage()), $e);
122122
}
123123
}
124124
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ResetPasswordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testResetPasswordTokenEmptyValue()
156156
public function testResetPasswordTokenMismatched()
157157
{
158158
$this->expectException(\Exception::class);
159-
$this->expectExceptionMessage('The password must be at least 8 characters long, minimum of 3 different classes of characters: Lower Case, Upper Case, Digits, Special Characters.');
159+
$this->expectExceptionMessage('The password token is mismatched. Reset and try again');
160160
$query = <<<QUERY
161161
mutation {
162162
resetPassword (

0 commit comments

Comments
 (0)