DEV Community

Cover image for A Google 401, a Saved Connection, and the Wrong Reconnect Prompt
asagiman for Netsujo

Posted on

A Google 401, a Saved Connection, and the Wrong Reconnect Prompt

In October 2026, a customer reported a specific interruption in Netsujo SIGNAL: after signing in again, the application kept asking them to reconnect Google.

For a product that reads Google Analytics 4 (GA4) and Search Console data, that prompt can stop the user's real work. We took responsibility for investigating the behavior in our own software.

A crucial detail: the prompt was a symptom, not proof of a revoked OAuth grant.

We found three code paths that could lead to misleading reconnection guidance. We corrected them and tested the user journey on an authorized production workspace. We did not establish which one caused each occurrence in the original customer's environment, and we cannot infer an improvement in overall retention or revenue from this incident alone.

We mapped five different states

A single “connected / not connected” boolean is tempting. It hides distinct operating conditions.

Layer Question Evidence to inspect
Application session Can this user sign in to SIGNAL? Application session state
Google grant Does an existing authorization still apply? Stored grant and explicit revocation/refresh errors
Resource selection Which GA4 property or Search Console site is selected? Saved selection, resource availability, permissions
API read Can the selected resource be read now? Scoped Google API response and error class
Product workflow Can the user return to their analysis? A real browser journey and data readback

These layers suggest different next actions. A user with a valid Google connection but no selected GA4 property needs to choose a property—not repeat OAuth. An ambiguous API error needs diagnosis rather than an automatic “grant revoked” claim.

Three code-level corrections

1. An ordinary Google API 401 was classified too broadly. A generic HTTP 401 in a data-read path does not, by itself, establish the specific invalid_grant condition. We separated general authentication failures, token-related conditions, and explicit grant invalidation. This preserved reconnection guidance for genuine cases while removing an overly broad path to it.

2. A stored connection and unavailable resources had been conflated. The application could tell a returning user to perform first-time setup when a saved connection existed but no resource was currently readable. We separated the saved-connection state from the resource/readability state.

3. An unselected data source looked like an unconnected account. An existing Google connection with no GA4 property or Search Console site selected should present a selection step. We updated the relevant guidance to reflect that state.

These were targeted fixes; they did not require broadening a user's access to Google resources.

A small acceptance matrix

We use the following as a generalized regression design, not a literal export of our production tests:

Synthetic setup Correct behavior
Connected account; no property selected Show selection, preserve connection
Saved connection; insufficient permission for selected resource Explain access issue, avoid “first connection” label
Generic Google data API 401 with unknown root cause Report the scoped error; do not silently mark grant revoked
Explicit invalid grant Guide an authorized reconnection
Successful logout, login, and data read Preserve prior selection and display fresh accessible data

The critical test is whether the product gives the next correct action. A technically valid token and a useful screen are different results.

What we verified in production

On October 21, 2026, after the fixes were released, we used an authorized production workspace. We checked the saved GA4 and Search Console selections before logout, signed out, signed in through the normal owner-controlled flow, reloaded the relevant screens, and read both data sources again. We also checked another tab within the same browser session.

In that scope, the connection and data retrieval persisted without a forced Google reconnection. Our record covers our own workspace and browser session. It does not claim an independent repeat in the reporting customer's account, nor validation in an isolated browser profile.

That difference matters when someone writes “fixed” in a release note. Source checks, automated tests, deployment, and actual user-workflow acceptance are separate pieces of evidence.

What we carry into FDE engagements

Forward Deployed Engineering puts technical work close to a user's operating problem. For integrations, our practical sequence is:

  1. Record the exact interrupted user action and the last known good state.
  2. Identify each system boundary capable of producing the same visible symptom.
  3. Define the expected next action for every meaningful state, including unknowns.
  4. Make the narrowest correction that preserves permission boundaries.
  5. Validate through an authorized end-to-end user journey and say exactly where the evidence stops.

We apply this approach to our product work and to integrations where clients need the software to remain usable after release.

If a customer reports “the integration is disconnected,” which concrete state does your application verify before showing that message?

Our full first-party incident record contains the broader chronology and validation limits. Netsujo works on AI/SaaS integration, implementation, and production-use verification.

Disclosure: this is Netsujo's first-party incident report, not an external reproduction or a measurement of business impact. No customer identity, credentials, or raw production logs are published.

Top comments (0)