Skip to content

Add alert if api call is failing on Storage purchase

What does this MR do and why?

Adds an alert with generic error description in case CustomersDot api returns an error on orderPreview endpoint

Related to #347393

Screenshots or screen recordings

Mobile Desktop
Screenshot_2022-01-10_at_11.05.20 Screenshot_2022-01-10_at_11.09.52

In action (mind that the video still have an old error message, see screenshot for the up-to-date one)

Screen_Recording_2021-12-23_at_19.31.35

How to set up and validate locally

  1. Run CustomersDot (in case to yet merged - branch for https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/4154) and GitLab locally
  2. On your local GitLab instance enable a feature toggle
  3. Run rails c
  4. Run Feature.enable(:new_route_storage_purchase) to enable the feature flag for Storage flow
  5. Make sure that you have correct settings Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
  6. Find an existing group with a subscription (Premium or Ultimate)
  7. Open this group and navigate to Settings -> Usage Quotas -> Storage click “Purchase more storage” OR use a fast forward link http://localhost:3000/-/subscriptions/buy_storage?selected_group=<id_of_an_existing_group>

MR acceptance checklist

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

Edited by Diana Zubova

Merge request reports

Loading