Skip to content

Fix(Purchase): handle email taken error

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR handles {"email": ["has already been taken"]} error by stringifying the JSON that leads to error for more robust error matching (corrects error string).

Note that this issue was created to follow up with error code implementation of the errors.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-03-21_at_16.20.22 Screenshot_2023-03-21_at_16.20.07

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Create a new account on CDot without using GitLab.com to authenticate
  2. Create a GitLab.com account with the same email address
  3. Attempt to make a purchase from GitLab.com

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #330608 (closed)

Merge request reports