Client-side errors are reported to monitoring
Why it matters
A server-side Sentry initialization without a client-side counterpart means rendering crashes, JavaScript exceptions, and failed client-side fetches are never reported. CWE-778 (Insufficient Logging) applies to both server and browser contexts — client errors that go unreported are failures with no observable signal. ISO 25010 reliability.fault-tolerance requires fault detection across all execution environments. In practice, many production JavaScript errors — component hydration mismatches, failed dynamic imports, browser-specific rendering bugs — occur exclusively in the browser and are invisible to server-side monitoring alone.
Severity rationale
Low because client-side error capture is a coverage gap rather than a security or data-loss risk, but it leaves a significant class of production failures unobservable.
Remediation
Add sentry.client.config.ts for Next.js to initialize the browser SDK, and forward errors caught by error boundaries to the monitoring service.
// sentry.client.config.ts
import * as Sentry from '@sentry/nextjs'
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 0.1,
})
In your error boundary:
<ErrorBoundary
onError={(error, info) => Sentry.captureException(error, { extra: info })}
fallbackRender={({ resetErrorBoundary }) => (
<div>Something went wrong. <button onClick={resetErrorBoundary}>Try again</button></div>
)}
>
<App />
</ErrorBoundary>
Verify by triggering a deliberate client-side throw in development and confirming it appears in your Sentry issues list.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Error Handling Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-778 — Insufficient Logging
- iso-25010:2011 · reliability.fault-tolerance
Taxons
History
- 2026-04-18·v1.0.0·Initial import from saas-error-handling·automated