Skip to content

GOOWOO-759: Clear connection error slots and improve creation handling#3523

Open
asvinb wants to merge 2 commits into
developfrom
fix/GOOWOO-759-account-limit-error
Open

GOOWOO-759: Clear connection error slots and improve creation handling#3523
asvinb wants to merge 2 commits into
developfrom
fix/GOOWOO-759-account-limit-error

Conversation

@asvinb

@asvinb asvinb commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Changes proposed in this Pull Request:

Closes https://linear.app/a8c/issue/GOOWOO-759/account-creation-limit-reached-error-not-surfaced-to-merchants

Replace this with a good description of your changes & reasoning.

Screenshots:

Detailed test instructions:

  1. Disconnect all accounts and go through the onboarding flow.
  2. Mock the /wp-json/wc/gla/ads/accounts [POST] endpoint with the mocked data below with the status code set to 406
  3. Ensure the error is displayed in the UI when trying to create a new Google Ads account.
  4. To test if previous error messages are cleared, mock the /wp-json/wc/gla/ads/accounts [POST] with the payload consisting of id. {"id":<xxx>} where is Google Ads Id you want to connect. Status code is 403

Sample mocked data:

  • Mocked response when creating a Google Ads account:
    • {
          "message": "Error creating account: Account creation limit reached. Contact support for help."
      }
      
  • Mocked response when connecting a Google Ads account:
    •   {
            "message": "The Google account you are using must have Admin access to Ads account xxx to proceed. Once updated to Admin access, it may take a while for the system to take effect.",
            "code": "API_ERROR",
            "data": {
                "statusCode": 403,
                "error": "Forbidden",
                "message": "The Google account you are using must have Admin access to Ads account xxx to proceed. Once updated to Admin access, it may take a while for the system to take effect."
            }
        }
      

Additional details:

Changelog entry

Fix - Surface Google Ads account creation errors to merchants during onboarding and clear stale errors when switching account actions.

@github-actions github-actions Bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.3%. Comparing base (2975ff8) to head (21e6c02).
⚠️ Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
...rd/connect-ads/connect-existing-account-actions.js 50.0% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #3523     +/-   ##
=========================================
+ Coverage     64.1%   64.3%   +0.2%     
=========================================
  Files          395     395             
  Lines         6773    6785     +12     
  Branches      1720    1721      +1     
=========================================
+ Hits          4342    4360     +18     
+ Misses        2170    2166      -4     
+ Partials       261     259      -2     
Flag Coverage Δ
js-unit-tests 64.3% <86.7%> (+0.2%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...nents/google-ads-account-card/connect-ads/index.js 96.2% <100.0%> (+0.5%) ⬆️
...ents/google-ads-account-card/disconnect-account.js 100.0% <100.0%> (ø)
js/src/hooks/useUpsertAdsAccount.js 100.0% <100.0%> (+47.1%) ⬆️
...rd/connect-ads/connect-existing-account-actions.js 87.5% <50.0%> (-12.5%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant