{"record":{"id":"ca47bf649cf602d6","repo":"deepseek-ai/deepseek-harness","slug":"lsp-malformed-response","errorCode":"LSP_MALFORMED_RESPONSE","errorMessage":"LSP navigation result was missing","messagePattern":"LSP navigation result was missing","errorType":"exception","errorClass":"LspError","httpStatus":null,"severity":"error","filePath":"packages/lsp/lsp-stdio/src/translate.ts","lineNumber":148,"sourceCode":"  const position = value as Record<string, unknown>\n  return isProtocolCoordinate(position.line) && isProtocolCoordinate(position.character)\n}\n\n/** Whether a wire coordinate is a valid nonnegative integer. */\nfunction isProtocolCoordinate(value: unknown): value is number {\n  return typeof value === 'number' && Number.isInteger(value) && value >= 0\n}\n\n/**\n * Normalize a navigation result (`Location`, `Location[]`, `LocationLink[]`, or `null`) to the seam's\n * locations. `Location` maps directly; `LocationLink` maps `targetUri` + `targetSelectionRange`.\n * @param payload - the raw `textDocument/definition|references|implementation` result.\n * @returns the normalized locations (empty for `null`/`[]`).\n * @throws Error when an element is neither a `Location` nor a `LocationLink`.\n */\nexport function normalizeLocations(payload: unknown): LspLocation[] {\n  if (payload === null) return []\n  if (payload === undefined) throw malformedResponse('LSP navigation result was missing')\n  const elements = Array.isArray(payload) ? payload : [payload]\n  const locations: LspLocation[] = []\n  for (const element of elements) {\n    if (element === null || typeof element !== 'object') {\n      throw malformedResponse('LSP navigation result contained a non-object entry')\n    }\n    const record = element as Record<string, unknown>\n    if (isLocationLink(record)) {\n      const link = record as unknown as WireLocationLink\n      locations.push({ uri: link.targetUri, range: toRange(link.targetSelectionRange) })\n    } else if (isLocation(record)) {\n      const location = record as unknown as WireLocation\n      locations.push({ uri: location.uri, range: toRange(location.range) })\n    } else {\n      throw malformedResponse('LSP navigation result contained neither a Location nor a LocationLink')\n    }\n  }\n  return locations","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/lsp-stdio/src/translate.ts#L130-L166","documentation":"Error \"LSP navigation result was missing\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/lsp/lsp-stdio/src/translate.ts:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the navigation query; the language server returned no result for the position."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}