perspectapi-ts-sdk 2.3.0 → 2.3.3

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.
package/dist/index.js CHANGED
@@ -106,13 +106,25 @@ var HttpClient = class {
106
106
  async request(endpoint, options = {}) {
107
107
  const url = this.buildUrl(endpoint, options.params);
108
108
  const requestOptions = this.buildRequestOptions(options);
109
- console.log(`[HTTP Client] Making ${options.method || "GET"} request to: ${url}`);
109
+ console.log(`[HTTP Client] ====== Request Details ======`);
110
+ console.log(`[HTTP Client] Method: ${options.method || "GET"}`);
110
111
  console.log(`[HTTP Client] Base URL: ${this.baseUrl}`);
111
112
  console.log(`[HTTP Client] Endpoint: ${endpoint}`);
112
113
  console.log(`[HTTP Client] Full URL: ${url}`);
113
114
  if (options.params) {
114
- console.log(`[HTTP Client] Query params:`, options.params);
115
+ console.log(`[HTTP Client] Query params:`, JSON.stringify(options.params, null, 2));
116
+ if (options.params.slug_prefix) {
117
+ console.log(`[HTTP Client] \u26A0\uFE0F slug_prefix detected: "${options.params.slug_prefix}"`);
118
+ }
119
+ }
120
+ const safeHeaders = { ...requestOptions.headers };
121
+ if (safeHeaders["Authorization"]) {
122
+ safeHeaders["Authorization"] = "Bearer [REDACTED]";
123
+ }
124
+ if (safeHeaders["X-API-Key"]) {
125
+ safeHeaders["X-API-Key"] = "[REDACTED]";
115
126
  }
127
+ console.log(`[HTTP Client] Headers:`, JSON.stringify(safeHeaders, null, 2));
116
128
  let lastError;
117
129
  for (let attempt = 0; attempt <= this.retries; attempt++) {
118
130
  try {
@@ -166,16 +178,26 @@ var HttpClient = class {
166
178
  */
167
179
  buildUrl(endpoint, params) {
168
180
  const url = `${this.baseUrl}${endpoint.startsWith("/") ? "" : "/"}${endpoint}`;
181
+ console.log(`[HTTP Client - URL Builder] Base URL: ${this.baseUrl}`);
182
+ console.log(`[HTTP Client - URL Builder] Endpoint: ${endpoint}`);
183
+ console.log(`[HTTP Client - URL Builder] Combined URL (before params): ${url}`);
169
184
  if (!params || Object.keys(params).length === 0) {
185
+ console.log(`[HTTP Client - URL Builder] No params, returning: ${url}`);
170
186
  return url;
171
187
  }
188
+ console.log(`[HTTP Client - URL Builder] Processing params:`, params);
172
189
  const searchParams = new URLSearchParams();
173
190
  Object.entries(params).forEach(([key, value]) => {
174
191
  if (value !== void 0 && value !== null) {
192
+ console.log(`[HTTP Client - URL Builder] Adding param: ${key}=${value}`);
175
193
  searchParams.append(key, String(value));
194
+ } else {
195
+ console.log(`[HTTP Client - URL Builder] Skipping null/undefined param: ${key}`);
176
196
  }
177
197
  });
178
- return `${url}?${searchParams.toString()}`;
198
+ const finalUrl = `${url}?${searchParams.toString()}`;
199
+ console.log(`[HTTP Client - URL Builder] Final URL: ${finalUrl}`);
200
+ return finalUrl;
179
201
  }
180
202
  /**
181
203
  * Build request options
@@ -223,27 +245,42 @@ var HttpClient = class {
223
245
  async handleResponse(response) {
224
246
  const contentType = response.headers.get("content-type");
225
247
  const isJson = contentType?.includes("application/json");
248
+ console.log(`[HTTP Client - Response] Status: ${response.status} ${response.statusText}`);
249
+ console.log(`[HTTP Client - Response] Content-Type: ${contentType}`);
226
250
  let data;
227
251
  try {
228
252
  data = isJson ? await response.json() : await response.text();
229
253
  } catch (error) {
254
+ console.error(`[HTTP Client - Response] Failed to parse response:`, error);
230
255
  data = null;
231
256
  }
257
+ const dataStr = JSON.stringify(data);
258
+ if (dataStr && dataStr.length > 1e3) {
259
+ console.log(`[HTTP Client - Response] Data (truncated):`, dataStr.substring(0, 1e3) + "...");
260
+ } else {
261
+ console.log(`[HTTP Client - Response] Data:`, data);
262
+ }
232
263
  if (!response.ok) {
264
+ console.error(`[HTTP Client - Response] Error response received`);
233
265
  const error = {
234
266
  message: data?.error || data?.message || `HTTP ${response.status}: ${response.statusText}`,
235
267
  status: response.status,
236
268
  code: data?.code,
237
269
  details: data
238
270
  };
271
+ console.error(`[HTTP Client - Response] Throwing error:`, error);
239
272
  throw error;
240
273
  }
241
274
  if (isJson && typeof data === "object") {
242
275
  if ("data" in data || "message" in data || "error" in data) {
243
- return data;
276
+ const apiResponse = data;
277
+ console.log(`[HTTP Client - Response] Returning API response with success=${apiResponse.success}, data length=${Array.isArray(apiResponse.data) ? apiResponse.data.length : "N/A"}`);
278
+ return apiResponse;
244
279
  }
280
+ console.log(`[HTTP Client - Response] Wrapping response in data property`);
245
281
  return { data, success: true };
246
282
  }
283
+ console.log(`[HTTP Client - Response] Returning text response`);
247
284
  return { data, success: true };
248
285
  }
249
286
  /**
@@ -778,6 +815,13 @@ var ContentClient = class extends BaseClient {
778
815
  const endpoint = this.siteScopedEndpoint(siteName);
779
816
  const path = this.buildPath(endpoint);
780
817
  const normalizedParams = params ? { ...params } : void 0;
818
+ console.log("[PerspectAPI Content] Starting content fetch:", {
819
+ siteName,
820
+ endpoint,
821
+ path,
822
+ originalParams: params,
823
+ normalizedParams
824
+ });
781
825
  if (normalizedParams) {
782
826
  const validatedLimit = validateOptionalLimit(
783
827
  normalizedParams.limit,
@@ -797,14 +841,52 @@ var ContentClient = class extends BaseClient {
797
841
  } else {
798
842
  delete normalizedParams.page_type;
799
843
  }
844
+ console.log("[PerspectAPI Content] Parameters after validation:", {
845
+ normalizedParams,
846
+ validatedLimit,
847
+ validatedPageType
848
+ });
800
849
  }
801
- return this.fetchWithCache(
850
+ console.log("[PerspectAPI Content] Cache details:", {
851
+ cacheEnabled: !!this.cache,
852
+ cachePolicy,
853
+ tags: this.buildContentTags(siteName)
854
+ });
855
+ const result = await this.fetchWithCache(
802
856
  endpoint,
803
857
  normalizedParams,
804
858
  this.buildContentTags(siteName),
805
859
  cachePolicy,
806
- () => this.http.get(path, normalizedParams)
860
+ async () => {
861
+ console.log("[PerspectAPI Content] Making HTTP request:", {
862
+ method: "GET",
863
+ url: path,
864
+ params: normalizedParams
865
+ });
866
+ const response = await this.http.get(path, normalizedParams);
867
+ console.log("[PerspectAPI Content] HTTP response received:", {
868
+ success: response.success,
869
+ dataLength: response.data?.length ?? 0,
870
+ pagination: response.pagination,
871
+ error: response.error,
872
+ message: response.message
873
+ });
874
+ if (response.data?.length === 0) {
875
+ console.warn("[PerspectAPI Content] WARNING: Received 0 results for query:", {
876
+ siteName,
877
+ params: normalizedParams,
878
+ fullResponse: response
879
+ });
880
+ }
881
+ return response;
882
+ }
807
883
  );
884
+ console.log("[PerspectAPI Content] Final result:", {
885
+ success: result.success,
886
+ dataLength: result.data?.length ?? 0,
887
+ pagination: result.pagination
888
+ });
889
+ return result;
808
890
  }
809
891
  /**
810
892
  * Get content by ID
package/dist/index.mjs CHANGED
@@ -45,13 +45,25 @@ var HttpClient = class {
45
45
  async request(endpoint, options = {}) {
46
46
  const url = this.buildUrl(endpoint, options.params);
47
47
  const requestOptions = this.buildRequestOptions(options);
48
- console.log(`[HTTP Client] Making ${options.method || "GET"} request to: ${url}`);
48
+ console.log(`[HTTP Client] ====== Request Details ======`);
49
+ console.log(`[HTTP Client] Method: ${options.method || "GET"}`);
49
50
  console.log(`[HTTP Client] Base URL: ${this.baseUrl}`);
50
51
  console.log(`[HTTP Client] Endpoint: ${endpoint}`);
51
52
  console.log(`[HTTP Client] Full URL: ${url}`);
52
53
  if (options.params) {
53
- console.log(`[HTTP Client] Query params:`, options.params);
54
+ console.log(`[HTTP Client] Query params:`, JSON.stringify(options.params, null, 2));
55
+ if (options.params.slug_prefix) {
56
+ console.log(`[HTTP Client] \u26A0\uFE0F slug_prefix detected: "${options.params.slug_prefix}"`);
57
+ }
58
+ }
59
+ const safeHeaders = { ...requestOptions.headers };
60
+ if (safeHeaders["Authorization"]) {
61
+ safeHeaders["Authorization"] = "Bearer [REDACTED]";
62
+ }
63
+ if (safeHeaders["X-API-Key"]) {
64
+ safeHeaders["X-API-Key"] = "[REDACTED]";
54
65
  }
66
+ console.log(`[HTTP Client] Headers:`, JSON.stringify(safeHeaders, null, 2));
55
67
  let lastError;
56
68
  for (let attempt = 0; attempt <= this.retries; attempt++) {
57
69
  try {
@@ -105,16 +117,26 @@ var HttpClient = class {
105
117
  */
106
118
  buildUrl(endpoint, params) {
107
119
  const url = `${this.baseUrl}${endpoint.startsWith("/") ? "" : "/"}${endpoint}`;
120
+ console.log(`[HTTP Client - URL Builder] Base URL: ${this.baseUrl}`);
121
+ console.log(`[HTTP Client - URL Builder] Endpoint: ${endpoint}`);
122
+ console.log(`[HTTP Client - URL Builder] Combined URL (before params): ${url}`);
108
123
  if (!params || Object.keys(params).length === 0) {
124
+ console.log(`[HTTP Client - URL Builder] No params, returning: ${url}`);
109
125
  return url;
110
126
  }
127
+ console.log(`[HTTP Client - URL Builder] Processing params:`, params);
111
128
  const searchParams = new URLSearchParams();
112
129
  Object.entries(params).forEach(([key, value]) => {
113
130
  if (value !== void 0 && value !== null) {
131
+ console.log(`[HTTP Client - URL Builder] Adding param: ${key}=${value}`);
114
132
  searchParams.append(key, String(value));
133
+ } else {
134
+ console.log(`[HTTP Client - URL Builder] Skipping null/undefined param: ${key}`);
115
135
  }
116
136
  });
117
- return `${url}?${searchParams.toString()}`;
137
+ const finalUrl = `${url}?${searchParams.toString()}`;
138
+ console.log(`[HTTP Client - URL Builder] Final URL: ${finalUrl}`);
139
+ return finalUrl;
118
140
  }
119
141
  /**
120
142
  * Build request options
@@ -162,27 +184,42 @@ var HttpClient = class {
162
184
  async handleResponse(response) {
163
185
  const contentType = response.headers.get("content-type");
164
186
  const isJson = contentType?.includes("application/json");
187
+ console.log(`[HTTP Client - Response] Status: ${response.status} ${response.statusText}`);
188
+ console.log(`[HTTP Client - Response] Content-Type: ${contentType}`);
165
189
  let data;
166
190
  try {
167
191
  data = isJson ? await response.json() : await response.text();
168
192
  } catch (error) {
193
+ console.error(`[HTTP Client - Response] Failed to parse response:`, error);
169
194
  data = null;
170
195
  }
196
+ const dataStr = JSON.stringify(data);
197
+ if (dataStr && dataStr.length > 1e3) {
198
+ console.log(`[HTTP Client - Response] Data (truncated):`, dataStr.substring(0, 1e3) + "...");
199
+ } else {
200
+ console.log(`[HTTP Client - Response] Data:`, data);
201
+ }
171
202
  if (!response.ok) {
203
+ console.error(`[HTTP Client - Response] Error response received`);
172
204
  const error = {
173
205
  message: data?.error || data?.message || `HTTP ${response.status}: ${response.statusText}`,
174
206
  status: response.status,
175
207
  code: data?.code,
176
208
  details: data
177
209
  };
210
+ console.error(`[HTTP Client - Response] Throwing error:`, error);
178
211
  throw error;
179
212
  }
180
213
  if (isJson && typeof data === "object") {
181
214
  if ("data" in data || "message" in data || "error" in data) {
182
- return data;
215
+ const apiResponse = data;
216
+ console.log(`[HTTP Client - Response] Returning API response with success=${apiResponse.success}, data length=${Array.isArray(apiResponse.data) ? apiResponse.data.length : "N/A"}`);
217
+ return apiResponse;
183
218
  }
219
+ console.log(`[HTTP Client - Response] Wrapping response in data property`);
184
220
  return { data, success: true };
185
221
  }
222
+ console.log(`[HTTP Client - Response] Returning text response`);
186
223
  return { data, success: true };
187
224
  }
188
225
  /**
@@ -717,6 +754,13 @@ var ContentClient = class extends BaseClient {
717
754
  const endpoint = this.siteScopedEndpoint(siteName);
718
755
  const path = this.buildPath(endpoint);
719
756
  const normalizedParams = params ? { ...params } : void 0;
757
+ console.log("[PerspectAPI Content] Starting content fetch:", {
758
+ siteName,
759
+ endpoint,
760
+ path,
761
+ originalParams: params,
762
+ normalizedParams
763
+ });
720
764
  if (normalizedParams) {
721
765
  const validatedLimit = validateOptionalLimit(
722
766
  normalizedParams.limit,
@@ -736,14 +780,52 @@ var ContentClient = class extends BaseClient {
736
780
  } else {
737
781
  delete normalizedParams.page_type;
738
782
  }
783
+ console.log("[PerspectAPI Content] Parameters after validation:", {
784
+ normalizedParams,
785
+ validatedLimit,
786
+ validatedPageType
787
+ });
739
788
  }
740
- return this.fetchWithCache(
789
+ console.log("[PerspectAPI Content] Cache details:", {
790
+ cacheEnabled: !!this.cache,
791
+ cachePolicy,
792
+ tags: this.buildContentTags(siteName)
793
+ });
794
+ const result = await this.fetchWithCache(
741
795
  endpoint,
742
796
  normalizedParams,
743
797
  this.buildContentTags(siteName),
744
798
  cachePolicy,
745
- () => this.http.get(path, normalizedParams)
799
+ async () => {
800
+ console.log("[PerspectAPI Content] Making HTTP request:", {
801
+ method: "GET",
802
+ url: path,
803
+ params: normalizedParams
804
+ });
805
+ const response = await this.http.get(path, normalizedParams);
806
+ console.log("[PerspectAPI Content] HTTP response received:", {
807
+ success: response.success,
808
+ dataLength: response.data?.length ?? 0,
809
+ pagination: response.pagination,
810
+ error: response.error,
811
+ message: response.message
812
+ });
813
+ if (response.data?.length === 0) {
814
+ console.warn("[PerspectAPI Content] WARNING: Received 0 results for query:", {
815
+ siteName,
816
+ params: normalizedParams,
817
+ fullResponse: response
818
+ });
819
+ }
820
+ return response;
821
+ }
746
822
  );
823
+ console.log("[PerspectAPI Content] Final result:", {
824
+ success: result.success,
825
+ dataLength: result.data?.length ?? 0,
826
+ pagination: result.pagination
827
+ });
828
+ return result;
747
829
  }
748
830
  /**
749
831
  * Get content by ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perspectapi-ts-sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.3",
4
4
  "description": "TypeScript SDK for PerspectAPI - Cloudflare Workers compatible",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -34,6 +34,15 @@ export class ContentClient extends BaseClient {
34
34
  ? { ...params }
35
35
  : undefined;
36
36
 
37
+ // Log initial request parameters
38
+ console.log('[PerspectAPI Content] Starting content fetch:', {
39
+ siteName,
40
+ endpoint,
41
+ path,
42
+ originalParams: params,
43
+ normalizedParams
44
+ });
45
+
37
46
  if (normalizedParams) {
38
47
  const validatedLimit = validateOptionalLimit(
39
48
  normalizedParams.limit,
@@ -54,15 +63,64 @@ export class ContentClient extends BaseClient {
54
63
  } else {
55
64
  delete normalizedParams.page_type;
56
65
  }
66
+
67
+ // Log parameter validation results
68
+ console.log('[PerspectAPI Content] Parameters after validation:', {
69
+ normalizedParams,
70
+ validatedLimit,
71
+ validatedPageType
72
+ });
57
73
  }
58
74
 
59
- return this.fetchWithCache<PaginatedResponse<Content>>(
75
+ // Log cache information
76
+ console.log('[PerspectAPI Content] Cache details:', {
77
+ cacheEnabled: !!this.cache,
78
+ cachePolicy,
79
+ tags: this.buildContentTags(siteName)
80
+ });
81
+
82
+ const result = await this.fetchWithCache<PaginatedResponse<Content>>(
60
83
  endpoint,
61
84
  normalizedParams,
62
85
  this.buildContentTags(siteName),
63
86
  cachePolicy,
64
- () => this.http.get(path, normalizedParams) as Promise<PaginatedResponse<Content>>
87
+ async () => {
88
+ console.log('[PerspectAPI Content] Making HTTP request:', {
89
+ method: 'GET',
90
+ url: path,
91
+ params: normalizedParams
92
+ });
93
+
94
+ const response = await this.http.get(path, normalizedParams) as PaginatedResponse<Content>;
95
+
96
+ console.log('[PerspectAPI Content] HTTP response received:', {
97
+ success: response.success,
98
+ dataLength: response.data?.length ?? 0,
99
+ pagination: response.pagination,
100
+ error: response.error,
101
+ message: response.message
102
+ });
103
+
104
+ // Log more details if we got 0 results
105
+ if (response.data?.length === 0) {
106
+ console.warn('[PerspectAPI Content] WARNING: Received 0 results for query:', {
107
+ siteName,
108
+ params: normalizedParams,
109
+ fullResponse: response
110
+ });
111
+ }
112
+
113
+ return response;
114
+ }
65
115
  );
116
+
117
+ console.log('[PerspectAPI Content] Final result:', {
118
+ success: result.success,
119
+ dataLength: result.data?.length ?? 0,
120
+ pagination: result.pagination
121
+ });
122
+
123
+ return result;
66
124
  }
67
125
 
68
126
  /**
@@ -68,14 +68,31 @@ export class HttpClient {
68
68
  const url = this.buildUrl(endpoint, options.params);
69
69
  const requestOptions = this.buildRequestOptions(options);
70
70
 
71
- // Log the full request details
72
- console.log(`[HTTP Client] Making ${options.method || 'GET'} request to: ${url}`);
71
+ // Enhanced logging for debugging
72
+ console.log(`[HTTP Client] ====== Request Details ======`);
73
+ console.log(`[HTTP Client] Method: ${options.method || 'GET'}`);
73
74
  console.log(`[HTTP Client] Base URL: ${this.baseUrl}`);
74
75
  console.log(`[HTTP Client] Endpoint: ${endpoint}`);
75
76
  console.log(`[HTTP Client] Full URL: ${url}`);
77
+
76
78
  if (options.params) {
77
- console.log(`[HTTP Client] Query params:`, options.params);
79
+ console.log(`[HTTP Client] Query params:`, JSON.stringify(options.params, null, 2));
80
+
81
+ // Specifically log slug_prefix if present
82
+ if (options.params.slug_prefix) {
83
+ console.log(`[HTTP Client] ⚠️ slug_prefix detected: "${options.params.slug_prefix}"`);
84
+ }
85
+ }
86
+
87
+ // Log headers (excluding sensitive data)
88
+ const safeHeaders: Record<string, any> = { ...requestOptions.headers };
89
+ if (safeHeaders['Authorization']) {
90
+ safeHeaders['Authorization'] = 'Bearer [REDACTED]';
91
+ }
92
+ if (safeHeaders['X-API-Key']) {
93
+ safeHeaders['X-API-Key'] = '[REDACTED]';
78
94
  }
95
+ console.log(`[HTTP Client] Headers:`, JSON.stringify(safeHeaders, null, 2));
79
96
 
80
97
  let lastError: Error;
81
98
 
@@ -146,18 +163,31 @@ export class HttpClient {
146
163
  private buildUrl(endpoint: string, params?: Record<string, any>): string {
147
164
  const url = `${this.baseUrl}${endpoint.startsWith('/') ? '' : '/'}${endpoint}`;
148
165
 
166
+ console.log(`[HTTP Client - URL Builder] Base URL: ${this.baseUrl}`);
167
+ console.log(`[HTTP Client - URL Builder] Endpoint: ${endpoint}`);
168
+ console.log(`[HTTP Client - URL Builder] Combined URL (before params): ${url}`);
169
+
149
170
  if (!params || Object.keys(params).length === 0) {
171
+ console.log(`[HTTP Client - URL Builder] No params, returning: ${url}`);
150
172
  return url;
151
173
  }
152
174
 
175
+ console.log(`[HTTP Client - URL Builder] Processing params:`, params);
176
+
153
177
  const searchParams = new URLSearchParams();
154
178
  Object.entries(params).forEach(([key, value]) => {
155
179
  if (value !== undefined && value !== null) {
180
+ console.log(`[HTTP Client - URL Builder] Adding param: ${key}=${value}`);
156
181
  searchParams.append(key, String(value));
182
+ } else {
183
+ console.log(`[HTTP Client - URL Builder] Skipping null/undefined param: ${key}`);
157
184
  }
158
185
  });
159
186
 
160
- return `${url}?${searchParams.toString()}`;
187
+ const finalUrl = `${url}?${searchParams.toString()}`;
188
+ console.log(`[HTTP Client - URL Builder] Final URL: ${finalUrl}`);
189
+
190
+ return finalUrl;
161
191
  }
162
192
 
163
193
  /**
@@ -215,20 +245,34 @@ export class HttpClient {
215
245
  const contentType = response.headers.get('content-type');
216
246
  const isJson = contentType?.includes('application/json');
217
247
 
248
+ console.log(`[HTTP Client - Response] Status: ${response.status} ${response.statusText}`);
249
+ console.log(`[HTTP Client - Response] Content-Type: ${contentType}`);
250
+
218
251
  let data: any;
219
252
  try {
220
253
  data = isJson ? await response.json() : await response.text();
221
254
  } catch (error) {
255
+ console.error(`[HTTP Client - Response] Failed to parse response:`, error);
222
256
  data = null;
223
257
  }
224
258
 
259
+ // Log response data (truncate if too large)
260
+ const dataStr = JSON.stringify(data);
261
+ if (dataStr && dataStr.length > 1000) {
262
+ console.log(`[HTTP Client - Response] Data (truncated):`, dataStr.substring(0, 1000) + '...');
263
+ } else {
264
+ console.log(`[HTTP Client - Response] Data:`, data);
265
+ }
266
+
225
267
  if (!response.ok) {
268
+ console.error(`[HTTP Client - Response] Error response received`);
226
269
  const error: ApiError = {
227
270
  message: data?.error || data?.message || `HTTP ${response.status}: ${response.statusText}`,
228
271
  status: response.status,
229
272
  code: data?.code,
230
273
  details: data,
231
274
  };
275
+ console.error(`[HTTP Client - Response] Throwing error:`, error);
232
276
  throw error;
233
277
  }
234
278
 
@@ -236,12 +280,16 @@ export class HttpClient {
236
280
  if (isJson && typeof data === 'object') {
237
281
  // If response has data property, return as-is
238
282
  if ('data' in data || 'message' in data || 'error' in data) {
239
- return data as ApiResponse<T>;
283
+ const apiResponse = data as ApiResponse<T>;
284
+ console.log(`[HTTP Client - Response] Returning API response with success=${apiResponse.success}, data length=${Array.isArray(apiResponse.data) ? apiResponse.data.length : 'N/A'}`);
285
+ return apiResponse;
240
286
  }
241
287
  // Otherwise wrap in data property
288
+ console.log(`[HTTP Client - Response] Wrapping response in data property`);
242
289
  return { data: data as T, success: true };
243
290
  }
244
291
 
292
+ console.log(`[HTTP Client - Response] Returning text response`);
245
293
  return { data: data as T, success: true };
246
294
  }
247
295