mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 09:29:01 +08:00
fix: resolve circular JSON structure error in search function (#1330)
Modified error handlers to avoid logging entire response objects that contain circular references
This commit is contained in:
parent
0154e40685
commit
e9804d25f9
@ -57,7 +57,10 @@ async function _req(
|
|||||||
return resp;
|
return resp;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.status === 429) {
|
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 new Error("Google Search: Too many requests, try again later.");
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user