fix: fixing unhandled exception when fetching settings file
We are seeing several server crashes caused by VWO SDK throwing unhandled exception.
Turned out the http(s).get doesn't have on("error") handler attached, which causes node crash if any HTTP(S) errors happen.
Codecov Report
Base: 93.18% // Head: 93.02% // Decreases project coverage by -0.15% :warning:
Coverage data is based on head (
2cc8a2c) compared to base (63ada71). Patch coverage: 16.66% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #44 +/- ##
==========================================
- Coverage 93.18% 93.02% -0.16%
==========================================
Files 59 59
Lines 2420 2424 +4
Branches 560 560
==========================================
Hits 2255 2255
- Misses 159 163 +4
Partials 6 6
| Flag | Coverage Δ | |
|---|---|---|
| Linux | 93.02% <16.66%> (-0.16%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/utils/SettingsFileUtil.js | 83.60% <16.66%> (-5.87%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
hey @softvar! any chance to review this one?
Not having .on("error") makes impossible to wrap getSettingFile in try/catch to handle any connectivity issues (like one from yesterday when https://dev.visualwebsiteoptimiser.com had an invalid SSL cert causing unhandled 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' error)
Hey @lytvynenko, this issue has been resolved.
We had updated SSL certificates on all our nodes today, and due to a certificate change, the SSL certificate was not fully accepted by all the machines. We became aware and resolved the issue on our end.
Let us work on adding an .on("error") for getSettingFile, in a future release.
hey @softvar! any chance to review this one? Not having
.on("error")makes impossible to wrapgetSettingFilein try/catch to handle any connectivity issues (like one from yesterday when https://dev.visualwebsiteoptimiser.com had an invalid SSL cert causing unhandled 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' error)
Is this getting added in a future release any time soon? Consistently hitting errno: -54, code: 'ECONNRESET' in one of our projects.