Skip to content

fix: add error logging to cloudflared socket handler empty catch blocks#6617

Merged
CommanderStorm merged 1 commit intolouislam:masterfrom
Achieve3318:fix/add-error-logging-to-cloudflared-handler
Jan 6, 2026
Merged

fix: add error logging to cloudflared socket handler empty catch blocks#6617
CommanderStorm merged 1 commit intolouislam:masterfrom
Achieve3318:fix/add-error-logging-to-cloudflared-handler

Conversation

@Achieve3318
Copy link
Copy Markdown
Contributor

Previously, errors in cloudflared socket handlers were silently swallowed by empty catch blocks, making debugging difficult. This commit adds proper error logging to all empty catch blocks in the cloudflared socket handler to improve observability and debugging.

  • Added error logging to join handler
  • Added error logging to leave handler
  • Added error logging to start handler
  • Added error logging to removeToken handler

ℹ️ To keep reviews fast and effective, please make sure you’ve read our pull request guidelines

📝 Summary of changes done and why they are done

📋 Related issues

  • Relates to #issue-number
  • Resolves #issue-number

📄 Checklist

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 My code adheres to the style guidelines of this project.
  • ⚠️ My changes generate no new warnings.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.

📷 Screenshots or Visual Changes

  • UI Modifications: Highlight any changes made to the user interface.
  • Before & After: Include screenshots or comparisons (if applicable).
Event Before After
UP Before After
DOWN Before After
Certificate-expiry Before After
Testing Before After

Previously, errors in cloudflared socket handlers were silently swallowed
by empty catch blocks, making debugging difficult. This commit adds
proper error logging to all empty catch blocks in the cloudflared
socket handler to improve observability and debugging.

- Added error logging to join handler
- Added error logging to leave handler
- Added error logging to start handler
- Added error logging to removeToken handler
Copy link
Copy Markdown
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me

@CommanderStorm CommanderStorm merged commit 9f219cb into louislam:master Jan 6, 2026
22 checks passed
@CommanderStorm CommanderStorm modified the milestone: 2.1.0 Jan 6, 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