MCPcopy Create free account
hub / github.com/brightdata/brightdata-mcp / parse_google_search_response

Function parse_google_search_response

search_utils.js:32–41  ·  view source on GitHub ↗
(response_text, tool_name)

Source from the content-addressed store, hash-verified

30}
31
32export function parse_google_search_response(response_text, tool_name){
33 try {
34 return clean_google_search_payload(JSON.parse(response_text));
35 } catch(e){
36 const snippet = truncate_response(response_text);
37 const details = snippet ? ` Response snippet: ${snippet}` : '';
38 throw new Error(`Unexpected non-JSON response from Bright Data`
39 +` for ${tool_name}.${details}`, {cause: e});
40 }
41}

Callers 2

server.jsFile · 0.90

Calls 2

truncate_responseFunction · 0.85

Tested by

no test coverage detected