bulltrackers-module 1.0.37 → 1.0.39

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.
@@ -38,10 +38,14 @@ exports.fetchAndStoreInsights = async (firestore, logger, headerManager, proxyMa
38
38
  };
39
39
  // --- End Refactor ---
40
40
 
41
- const { response } = await proxyManager.fetch(config.etoroInsightsUrl, fetchOptions);
41
+ const response = await proxyManager.fetch(config.etoroInsightsUrl, fetchOptions);
42
+
42
43
 
43
44
  if (!response || typeof response.text !== 'function') {
44
- logger.log('ERROR', `[FetchInsightsHelpers] Invalid or incomplete response received`, { response });
45
+ // Force the response object into the string using JSON.stringify
46
+ const responseString = JSON.stringify(response, null, 2);
47
+ logger.log('ERROR', `[FetchInsightsHelpers] Invalid or incomplete response received. Response object: ${responseString}`);
48
+
45
49
  throw new Error(`Invalid response structure received from proxy.`);
46
50
  }
47
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [