{"record":{"id":"d0eafc3676ed15ab","repo":"googleapis/mcp-toolbox","slug":"http-error-status-response-status","errorCode":null,"errorMessage":"HTTP error! status: ${response.status}","messagePattern":"HTTP error! status: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"internal/server/static/js/loadTools.js","lineNumber":45,"sourceCode":"export async function loadTools(secondNavContent, toolDisplayArea, toolsetName) {\n    secondNavContent.innerHTML = '<p>Fetching tools...</p>';\n    try {\n        const url = toolsetName ? `/mcp/${toolsetName}` : `/mcp`;\n        const response = await fetch(url, {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application/json',\n                'MCP-Protocol-Version': '2025-11-25'\n            },\n            body: JSON.stringify({\n                jsonrpc: \"2.0\",\n                id: \"1\",\n                method: \"tools/list\",\n            })\n        });\n        \n        if (!response.ok) {\n            throw new Error(`HTTP error! status: ${response.status}`);\n        }\n        \n        const apiResponse = await response.json();\n        renderToolList(apiResponse, secondNavContent, toolDisplayArea);\n    } catch (error) {\n        console.error('Failed to load tools:', error);\n        secondNavContent.innerHTML = `<p class=\"error\">Failed to load tools: <pre><code>${escapeHtml(String(error))}</code></pre></p>`;\n    }\n}\n\n/**\n * Renders the list of tools as buttons within the provided HTML element.\n * @param {Object} apiResponse The API response object containing the tools.\n * @param {!HTMLElement} secondNavContent The HTML element to render the tool list into.\n * @param {!HTMLElement} toolDisplayArea The HTML element for displaying tool details (passed to event handlers).\n */\nfunction renderToolList(apiResponse, secondNavContent, toolDisplayArea) {\n    secondNavContent.innerHTML = '';","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/static/js/loadTools.js#L27-L63","documentation":"A \"geoPointValue\" must be a map containing numeric \"latitude\" and \"longitude\" keys. If either key is missing or not a float64 (after JSON decoding, only float64 counts), the converter rejects the value with this error.","triggerScenarios":"Passing {\"geoPointValue\": {\"lat\": 37.4, \"lng\": -122.1}} (wrong key names), {\"geoPointValue\": {\"latitude\": \"37.4\", \"longitude\": \"-122.1\"}} (strings not numbers), or {\"geoPointValue\": \"37.4,-122.1\"} (not a map).","commonSituations":"Clients use abbreviated key names (lat/lng); coordinates arrive as strings from CSV or form inputs; the whole geopoint is serialized as a \"lat,lng\" string.","solutions":["Rename the keys to exactly \"latitude\" and \"longitude\".","Convert coordinate strings to JSON numbers so they decode as float64.","Wrap the pair in a map if it was passed as a plain string."],"exampleFix":"// before\n{\"geoPointValue\": {\"lat\": \"37.4\", \"lng\": \"-122.1\"}}\n// after\n{\"geoPointValue\": {\"latitude\": 37.4, \"longitude\": -122.1}}","handlingStrategy":"validation","validationCode":"func validGeoPoint(m map[string]any) bool {\n    lat, lok := m[\"latitude\"].(float64)\n    lng, gok := m[\"longitude\"].(float64)\n    return lok && gok\n}","typeGuard":"func asGeoPoint(v any) (lat, lng float64, ok bool) {\n    m, mok := v.(map[string]any); if !mok { return }\n    lat, lok := m[\"latitude\"].(float64); lng, gok := m[\"longitude\"].(float64)\n    return lat, lng, lok && gok\n}","tryCatchPattern":"if _, err := JSONToFirestoreValue(val, client); err != nil {\n    if strings.Contains(err.Error(), \"invalid geopoint value format\") { /* normalize keys/numeric types and retry */ }\n}","preventionTips":["Use exactly \"latitude\" and \"longitude\" key names","Ensure coordinates are JSON numbers, not strings","Validate geopoints with a schema (e.g. JSON Schema) before conversion"],"tags":["firestore","geopoint","validation"],"backgroundTag":"invalid-geopoint-format","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}