vuestorefront / magento2

Vue Storefront 2 integration for Magento 2
https://docs.vuestorefront.io/magento
MIT License
172 stars 117 forks source link

[BUG] Improper error handling for resetPassword #1531

Open chris-vaimo opened 2 months ago

chris-vaimo commented 2 months ago

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.

https://github.com/vuestorefront/magento2/blob/b8eb1e1fb87f9ee1f71ec621db097de905d6c70b/packages/api-client/src/api/resetPassword/index.ts#L60