fix(onboarding): swallow reverse proxy check errors instead of toasting#59227
Merged
rafaeelaudibert merged 1 commit intoMay 20, 2026
Merged
Conversation
The reverse proxy check runs in an afterMount hook on every scene that mounts ProductSetupButton. When the underlying HogQL query 500s, kea-loaders surfaces a user-facing 'Load has reverse proxy failed: A server error occurred' toast even though the check is purely advisory (used to auto-complete a setup task). Catch the error inside the loader, report it to PostHog, and return the previous hasReverseProxy value so kea-loaders has nothing to toast on. Generated-By: PostHog Code Task-Id: debd870a-5fbe-4cdd-a6d4-98a180320e96
Contributor
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
Contributor
|
Size Change: +4.24 kB (0%) Total Size: 118 MB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
|
Reviews (1): Last reviewed commit: "fix(onboarding): swallow reverse proxy c..." | Re-trigger Greptile |
rafaeelaudibert
approved these changes
May 20, 2026
This was referenced May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users on every scene (Dashboards, Insights, etc.) intermittently see a confusing red error toast:
The toast comes from the reverse proxy check in
reverseProxyCheckerLogic, which runs in anafterMounthook. BecauseProductSetupButtonis globally mounted viafrontend/src/layout/scenes/components/SceneTitleSection.tsx, the check fires on essentially every scene.The HogQL query (
SELECT DISTINCT properties.$lib_custom_api_host …) used by the check has been returning 500s since around 2026-05-11 (sharp regression from ~74-290/day to 1,129 on 2026-05-11 and 3,153 on 2026-05-12 according to$exceptiondata taggedproductKey='platform_and_support'). The kea-loader had noonErrorhandler, so kea-loaders' default behavior auto-converts the rejection into the user-facing toast.This check is purely advisory — it is only used to auto-complete a setup task. It never warranted a user-visible error.
The underlying server-side 500 is a separate investigation and not addressed here.
Changes
reverseProxyCheckerLogicintry/catch. On failure, capture the error to PostHog viaposthog.captureException(wrapped in a descriptiveErrorso it's easy to find in error tracking) and return the previoushasReverseProxyvalue instead of rethrowing. This stops kea-loaders from auto-toasting.lemonToast.erroris not called and (b) the exception is captured with the expected wrapper message.How did you test this code?
I'm an agent — I did not perform manual UI testing in this session. Automated coverage:
reverseProxyCheckerLogic.test.tscovering the 500 path. The previous session ran the full test file (4 tests, including the new one) successfully viahogli test. The fresh workspace used for this PR does not havenode_modulesinstalled, so I did not re-run jest here — the code changes are identical to what passed previously.lib_custom_api_host, has reverse proxy) are unchanged and still cover the success branch.Publish to changelog?
no
🤖 Agent context
52cbcc3, which added the Quick Start section), and the missingonErrorhandler. I confirmed by readingreverseProxyCheckerLogic.ts,initKea.ts's loaderonFailurebehavior, and theProductSetupButtonmount path inSceneTitleSection.tsx.onErrorto the loaders config and returning a default — works, but a localtry/catchkeeps the error-handling close to the call and makes the intent clearer; (2) silently swallowing without capturing — rejected, because we still want visibility into the underlying HogQL regression in error tracking. Wrapping the original error ascausepreserves the stack for debugging.