Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix: resolve circular JSON structure error in search function (#1330)

Abdul Rahman ArMe9804d25f96b
diff --git a/apps/api/src/search/googlesearch.ts b/apps/api/src/search/googlesearch.ts
index 3389ef918..8e6eade00 100644
--- a/apps/api/src/search/googlesearch.ts
+++ b/apps/api/src/search/googlesearch.ts
@@ -57,7 +57,10 @@ async function _req(
return resp;
} catch (error) {
if (error.response && error.response.status === 429) {
- logger.warn("Google Search: Too many requests, try again later.", error.response);
+ logger.warn("Google Search: Too many requests, try again later.", {
+ status: error.response.status,
+ statusText: error.response.statusText
+ });
throw new Error("Google Search: Too many requests, try again later.");
}
throw error;