Skip to content

fix(umami): drop console.error noise from Umami unreachable paths - #109

Merged
danielheene merged 2 commits into
mainfrom
fix/umami-e2e-noise
Oct 9, 2026
Merged

danielheene merged 2 commits into
mainfrom
fix/umami-e2e-noise

Conversation

@danielheene

Copy link
Copy Markdown
Owner

Summary

  • Remove console.error from UmamiWidget.data.ts login, verify, and fetch catch blocks — Umami being down is expected in test/E2E environments, all paths already return null gracefully
  • Add try/catch to the /stats/[...path] proxy route to prevent Next.js from logging "Failed to proxy" on upstream fetch failures; returns 502 instead of an unhandled throw
  • Use bare catch (no binding) since the error value is not used

Test plan

  • E2E logs no longer show Error logging in to Umami or Failed to proxy spam

Localhost values in .env.test are format-valid placeholders — treating them
as real URLs causes consumers (UmamiWidget, ServiceStatus) to attempt network
connections to addresses that don't exist in test and E2E environments, filling
logs with ECONNREFUSED noise. readExternalUrl() now returns undefined for any
localhost/127.0.0.1/::1 URL, so those consumers skip their network calls
without needing per-consumer guards.
Remove console.error from UmamiWidget.data.ts login/verify/fetch catch blocks
and from the /stats proxy route — Umami being unreachable is expected in
test/E2E environments and all paths already return null/204/502 gracefully.
Revert the runtimeConfig localhost-filter approach (wrong layer).
@kilo-code-bot

kilo-code-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • app/(frontend)/stats/[...path]/route.ts
  • src/widgets/UmamiWidget/UmamiWidget.data.ts

Reviewed by free · Input: 181.8K · Output: 2.7K · Cached: 34.6K

@danielheene
danielheene merged commit 4b352f0 into main Oct 9, 2026
7 checks passed
@danielheene
danielheene deleted the fix/umami-e2e-noise branch October 9, 2026 10:05
danielheene-website-release Bot pushed a commit that referenced this pull request Oct 9, 2026
## [1.12.3](v1.12.2...v1.12.3) (2026-10-09)

### Bug Fixes

* **umami:** drop console.error noise from Umami unreachable paths ([#109](#109)) ([4b352f0](4b352f0))
@danielheene-website-release

Copy link
Copy Markdown

🎉 This PR is included in version 1.12.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Testing — 89afa64d Deployed Oct 9, 2026 by danielheene via CI / E2E Tests #81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant