Skip to content

fix: replace empty catch blocks with proper error logging#1268

Open
PremSahith wants to merge 2 commits into
JiyaBatra:mainfrom
PremSahith:fix/1208-empty-catch-blocks
Open

fix: replace empty catch blocks with proper error logging#1268
PremSahith wants to merge 2 commits into
JiyaBatra:mainfrom
PremSahith:fix/1208-empty-catch-blocks

Conversation

@PremSahith

Copy link
Copy Markdown
Contributor

🛠️ Related Issue

Closes: #1208

📌 Description

This PR addresses the issue of empty catch blocks across the codebase silently swallowing errors. It ensures that when critical API fetches or state updates fail, the errors are properly logged to the console, making it easier to trace bugs and debug production issues.

✨ Changes Made

  • Identified and replaced empty or silent catch and catch (error) blocks across the client/ and server/ directories.
  • Added console.error("Error:", error); to ensure developers receive diagnostic information on failures.
  • Affected files include AuthProvider.jsx, various lesson components, executeController.js, passport.js, and server/index.js, among others (20 files total).

📷 Screenshots

No UI changes were made in this PR.

🧪 Type of Change

  • Bug fix
  • New feature
  • UI/UX improvement
  • Documentation update

✔️ Checklist

  • My code follows project style guidelines
  • I have tested my changes
  • I have linked the related issue
  • No unnecessary files are included

🚨 Notes for Contributors

  • Please ensure PR is linked to an issue before submission
  • Incomplete PRs may not be reviewed

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@PremSahith is attempting to deploy a commit to the jiya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for codevibeforyou ready!

Name Link
🔨 Latest commit 25b91d8
🔍 Latest deploy log https://app.netlify.com/projects/codevibeforyou/deploys/6a37ab51ec39ac000881539d
😎 Deploy Preview https://deploy-preview-1268--codevibeforyou.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JiyaBatra

Copy link
Copy Markdown
Owner

@PremSahith Resolve merge conflict

@PremSahith

Copy link
Copy Markdown
Contributor Author

@PremSahith Resolve merge conflict

@JiyaBatra I have resolved them.

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.

[Bug]: Replace empty catch blocks with proper error logging

2 participants