The /wp-admin/admin-ajax.php?action=seoforge_ga4_properties handler now classifies errors so the client can render a localised UI without ever showing raw Google API text.
json
{ "success": true, "data": { "properties": [ ... ], "current": "properties/123" } }json
{
"success": false,
"data": {
"code": "auth_revoked", // or "server_error"
"status": 401,
"message_raw": "Google returned: invalid_grant",
"auth_url": "https://api.avakode.com/integrations/google/auth?license_key=…"
}
}code values:
auth_revoked— 401/403 or message containsreconnect/no google; UI shows “Access lost” + Reconnect button.server_error— everything else; UI shows “Temporary connection issue” + Retry button.
message_raw is retained for developer debugging only — the UI never renders it (it’s logged to console.warn).