Skip to content

refactor: enforce console.error for exceptions and silence production analytics logs#2207

Open
aman-ali07 wants to merge 1 commit intojson-schema-org:mainfrom
aman-ali07:fix/console-log-cleanup
Open

refactor: enforce console.error for exceptions and silence production analytics logs#2207
aman-ali07 wants to merge 1 commit intojson-schema-org:mainfrom
aman-ali07:fix/console-log-cleanup

Conversation

@aman-ali07
Copy link

@aman-ali07 aman-ali07 commented Feb 5, 2026

Body:
What kind of change does this PR introduce?
Refactoring / Code Quality Improvement

#2205 Issue Number

Summary
This PR addresses logging inconsistencies to improve both developer experience and production code quality:

  1. Semantic Error Logging**: Updates `components/GettingStarted.tsx` to use `console.error()` within catch blocks. This ensures errors vary visually in the console and are correctly captured by error monitoring tools.
  2. Cleaner Production Console**: Removes the unconditional "Event posted successfully" log from `pages/tools/lib/postAnalytics.ts`.
    • Note*: The existing development-only guard (`process.env.NODE_ENV !== 'production'`) for the "Analytics event disabled" message is preserved, ensuring developers still get feedback in local environments.

Does this PR introduce a breaking change?
No

Checklist

@aman-ali07 aman-ali07 requested a review from a team as a code owner February 5, 2026 10:10
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi @aman-ali07! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: kind of change description

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 83deb9e

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi @aman-ali07! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: kind of change description

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (974ad0e) to head (83deb9e).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2207   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          640       640           
  Branches       198       198           
=========================================
  Hits           640       640           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi @aman-ali07! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: kind of change description

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

1 similar comment
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi @aman-ali07! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: kind of change description

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi @aman-ali07! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: issue reference, kind of change description

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

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

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

1 participant