Skip to content

Commit e000d60

Browse files
committed
[TASK] Updated the Exception description for V1/customers/password
1 parent d19e900 commit e000d60

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,13 @@ public function initiatePasswordReset($email, $template, $websiteId = null)
526526
default:
527527
throw new InputException(
528528
__(
529-
'Invalid value of "%value" provided for the %fieldName field.',
530-
['value' => $template, 'fieldName' => 'email type']
529+
'Invalid value of "%value" provided for the %fieldName field. Possible values are %template1 or %template2.',
530+
[
531+
'value' => $template,
532+
'fieldName' => 'template',
533+
'template1' => AccountManagement::EMAIL_REMINDER,
534+
'template2' => AccountManagement::EMAIL_RESET
535+
]
531536
)
532537
);
533538
}

app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ public function testInitiatePasswordResetEmailReset()
11581158

11591159
/**
11601160
* @expectedException \Magento\Framework\Exception\InputException
1161-
* @expectedExceptionMessage Invalid value of "" provided for the email type field
1161+
* @expectedExceptionMessage Invalid value of "" provided for the template field. Possible values are email_reminder or email_reset.
11621162
*/
11631163
public function testInitiatePasswordResetNoTemplate()
11641164
{

0 commit comments

Comments
 (0)