get_network_errors
Retrieve network error logs from browser automation sessions to identify and troubleshoot connectivity issues during web testing on ARM64 devices.
Instructions
Get network error logs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:795-799 (handler)The primary handler function for the 'get_network_errors' tool. It returns the stored network errors (HTTP status >=400) as a JSON string in the MCP response format.async getNetworkErrors() { return { content: [{ type: 'text', text: JSON.stringify(networkErrors, null, 2) }], }; }
- index.js:255-262 (registration)Registers the 'get_network_errors' tool in the ListToolsRequestSchema response, providing name, description, and schema.{ name: 'get_network_errors', description: 'Get network error logs', inputSchema: { type: 'object', properties: {}, }, },
- index.js:258-261 (schema)Input schema for the tool, defined as an empty object (no required parameters).inputSchema: { type: 'object', properties: {}, },
- index.js:373-374 (handler)Dispatch logic in the central CallToolRequestSchema handler that routes calls to get_network_errors to the specific method.case 'get_network_errors': return await this.getNetworkErrors();
- index.js:530-548 (helper)Event listener in setupEventListeners that populates the networkErrors array from CDP Network.responseReceived events for status codes >=400.if (message.method === 'Network.responseReceived') { const logEntry = { url: message.params.response.url, status: message.params.response.status, statusText: message.params.response.statusText, method: message.params.response.requestMethod || 'GET', timestamp: new Date().toISOString() }; networkLogs.push(logEntry); if (message.params.response.status >= 400) { networkErrors.push(logEntry); } // Keep only last 100 entries if (networkLogs.length > 100) networkLogs.shift(); if (networkErrors.length > 100) networkErrors.shift(); }