Skip to content

Conversation

mithun50
Copy link

@mithun50 mithun50 commented Oct 4, 2025

Fixed #4510
Fixed critical bug where accessing err.response.data without null checks caused TypeError crashes when network errors occurred (timeouts, DNS failures, connection refused). These errors don't have err.response property.

Changes:

  • src/common/retryer.js: Use optional chaining for err.response.data access
  • src/fetchers/wakatime.js: Use optional chaining for err.response.status
  • tests/retryer.test.js: Add test coverage for network error scenarios

Fixes crashes with "Cannot read property 'data' of undefined" and ensures graceful error handling during network instability.

…ccess

Fixed critical bug where accessing err.response.data without null checks
caused TypeError crashes when network errors occurred (timeouts, DNS failures,
connection refused). These errors don't have err.response property.

Changes:
- src/common/retryer.js: Use optional chaining for err.response.data access
- src/fetchers/wakatime.js: Use optional chaining for err.response.status
- tests/retryer.test.js: Add test coverage for network error scenarios

Fixes crashes with "Cannot read property 'data' of undefined" and ensures
graceful error handling during network instability.
Copy link

vercel bot commented Oct 4, 2025

@mithun50 is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the wakatime-card Issues related to the wakatime card. label Oct 4, 2025
Copy link
Author

@mithun50 mithun50 left a comment

Choose a reason for hiding this comment

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

Review required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wakatime-card Issues related to the wakatime card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Critical: Uncaught TypeError crashes on network errors due to unsafe err.response access in retryer.js and wakatime.js
1 participant