Skip to content

fix: remove redundant console.error calls in getPaymentStatus#264

Closed
mehmetkr-31 wants to merge 1 commit intobase:masterfrom
mehmetkr-31:fix/remove-console-error-getPaymentStatus
Closed

fix: remove redundant console.error calls in getPaymentStatus#264
mehmetkr-31 wants to merge 1 commit intobase:masterfrom
mehmetkr-31:fix/remove-console-error-getPaymentStatus

Conversation

@mehmetkr-31
Copy link
Copy Markdown

Summary

  • Removed two console.error() calls in getPaymentStatus() that were redundant with the existing telemetry system (logPaymentStatusCheckError)
  • Line 83: RPC error path — already logged via telemetry before throwing
  • Line 267: Catch block — already logged via telemetry before re-throwing
  • Avoids leaking internal error details to the browser console in production

Why

Both error paths already call logPaymentStatusCheckError() for structured observability. The console.error calls add no diagnostic value and expose internal error objects to end users' browser consoles.

Test plan

  • All 19 existing tests in getPaymentStatus.test.ts pass
  • Lint passes (yarn lint)
  • Build passes (yarn build in account-sdk package)

🤖 Generated with Claude Code

@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Apr 4, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Both console.error calls are redundant since errors are already captured
by the telemetry system via logPaymentStatusCheckError. Removing them
avoids leaking internal error details to the browser console in
production while keeping the structured telemetry logging intact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mehmetkr-31 mehmetkr-31 force-pushed the fix/remove-console-error-getPaymentStatus branch from 7561f9a to 1356d83 Compare April 4, 2026 21:58
@mehmetkr-31
Copy link
Copy Markdown
Author

Closing in favor of #267 which includes this change as part of a broader structured error propagation across the entire payment module.

@mehmetkr-31 mehmetkr-31 closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants