Skip to content

fix: stop logging leaking data and stop errors disappearing silently - #897

Open
benzeneCLI wants to merge 1 commit into
rinafcode:mainfrom
benzeneCLI:fix/benzenecli-logging-permissions-792-795
Open

fix: stop logging leaking data and stop errors disappearing silently#897
benzeneCLI wants to merge 1 commit into
rinafcode:mainfrom
benzeneCLI:fix/benzenecli-logging-permissions-792-795

Conversation

@benzeneCLI

Copy link
Copy Markdown

Adds four small, self-contained modules, one per issue. No existing files are modified, so this merges cleanly alongside the other open PRs.

What's included

Issue Module What it does
#792 src/utils/sanitizeErrorResponse.ts Recursively redacts password/token/secret/card/cvv/ssn/authorization from error bodies before they reach console or Sentry. Depth-capped so a cyclic body cannot hang the logger.
#793 src/components/common/PermissionDeniedView.tsx Replaces the blank screen on a denied permission with a clear message and a "Go to Settings" action. Settings handler is injectable for tests.
#794 src/utils/safeLog.ts Guards logger calls so a throwing logger (Sentry uninitialised, circular JSON) can never unwind the interceptor and lose the original error. Sync and async variants.
#795 src/hooks/useAsyncEffectState.ts Captures rejections from async effects instead of discarding them with void, exposing { error, loading } and skipping state updates after unmount.

Notes

  • Kept deliberately small (each file is under 50 lines) and additive only.

Closes #792
Closes #793
Closes #794
Closes #795

Adds four small, self-contained modules:

- sanitizeErrorResponse: recursively redacts passwords, tokens and PII from
  error bodies before they reach console or Sentry (rinafcode#792)
- PermissionDeniedView: replaces the blank screen on a denied permission with
  an explanation and a route into system settings (rinafcode#793)
- safeLog: guards logger calls so a throwing logger can never unwind the
  interceptor and lose the original error (rinafcode#794)
- useAsyncEffectState: captures rejections from async effects instead of
  discarding them with the void operator (rinafcode#795)
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@benzeneCLI Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment