advanced-tls-client 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -877,13 +877,15 @@ class AdvancedTLSClient {
877
877
  }
878
878
  }
879
879
  const text = body.toString('utf-8');
880
- let parsedJson;
880
+ let parsedJson = undefined;
881
881
  const ct = headers['content-type']?.toLowerCase();
882
882
  if (ct?.includes('application/json')) {
883
883
  try {
884
884
  parsedJson = JSON.parse(text);
885
885
  }
886
- catch { }
886
+ catch (e) {
887
+ parsedJson = undefined;
888
+ }
887
889
  }
888
890
  resolve({
889
891
  statusCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "advanced-tls-client",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {