vuestorefront/magento2

[BUG] Improper error handling for resetPassword

chris-vaimo opened this issue · 0 comments

Expected Behavior

resetPassword returns error messages from Magento as they are returned from GraphQL.

Actual Behavior

resetPassword throws a hardcoded error, causing the Alokai Magento SDK to return a generic "Internal Server Error" due to lack of handling for such a case.

Possible Solution:

Remove the logic defined in these lines.

if (!result.data.resetPassword) throw new Error("It was not possible to change the user password.");