Skip to content

[PAP][GraphQL] resetPassword mutation returns generic error #30179

Closed
@magento-engcom-team

Description

@magento-engcom-team

While implementing resetPassword functionality into PWA, an engineer ran into a problem that resulted in this generic error response: Cannot set the customer's password. It took digging through the exception log to discover the provided password didn't meet the minimum password requirements, which was not in the error message.

<2020-08-11 19:59:26] report.ERROR: Cannot set the customer's password {"exception":"[object] (GraphQL\\Error\\Error(code: 0): Cannot set the customer's password at /app/vendor/webonyx/graphql-php/src/Error/Error.php:174, Magento\\Framework\\GraphQl\\Exception\\GraphQlInputException(code: 0): Cannot set the customer's password at /app/vendor/magento/module-customer-graph-ql/Model/Resolver/ResetPassword.php:121, Magento\\Framework\\Exception\\InputException(code: 0): Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters. at /app/vendor/magento/module-customer/Model/AccountManagement.php:764)"} [>

Repro Steps:

  1. Execute requestPasswordResetEmail mutation and extract token from email
  2. Execute resetPassword mutation with a weak password in newPassword field

Expected: Error is returned with language explaining password didn't meet specific requirements (message from exception log)
Actual: Cannot set the customer's password

image (3) (1)
image (2) (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CustomerGraphQlIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPAPPartners acceleration programPriority: P3May be fixed according to the position in the backlog.Progress: doneProject: GraphQLReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions