Provide more helpful error messages to the user during purchase
Summary
An error occurred in the purchase step. If the problem persists please contact support at https://support.gitlab.com.
The above generic error is displayed when there is an issue with a purchase on GitLab.com. A few of the issues that are recorded in Sentry error logs are:
-
[{"Code"=>"INVALID_VALUE", "Message"=>"The Contract effective date should not be later than the term end date of the basic subscription."}]}]}"reported in Create new subscription for CI Minutes if custo... (customers-gitlab-com#3117 - closed) -
"last_name":["can't be blank"]reported in New Order from .com billing page results in {"l... (#298721 - closed) -
Transaction declined.generic_decline - Your card was declinedreported in https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/3811+ -
{"email"=>["has already been taken"]}reported in Email has already been taken in purchase flow (#330608 - closed)
Quote from customer:
It would be great if you be able to make your errors messages more informative
Proposal
We should improve this error message to be clearer and provide suggestions for a solution. For example:
| Error (describes what happened, not user-facing) | Message to display (user-facing) |
|---|---|
| The Contract effective date should not be later than the term end date of the basic subscription. | An error occurred with your purchase because your group is currently linked to an expired subscription. Open a support ticket and our support team will assist with a workaround. |
| "last_name":["can't be blank"] | A full name in your profile is required to make a purchase. Check that the full name field in your user profile has both a first and last name, and retry the purchase. If the problem persists, contact support. |
| Transaction declined.generic_decline - Your card was declined | Your card was declined. Contact your card issuer for more information or contact our sales team to pay with an alternative payment method. |
| {"email"=>["has already been taken"]} | An error occurred with your purchase. We detected a Customers Portal account that matches your email address, but it has not been linked to your GitLab.com account. Follow the instructions to link your Customers Portal account, and retry the purchase. If the problem persists, contact support. |
| Your card has insufficient funds. | Your card was declined due to insufficient funds. Make sure that you have sufficient funds, and retry the purchase. If the problem persists, contact support. |
Result
Less confusion and frustration on the customer's side and reduced ticket load.
@jameslopez @tgolubeva @gitlab-com/support/licensing-subscription What do you think?
Edited by Angelo Gulina