{"record":{"id":"32c2a9191d714b48","repo":"bytedance/deer-flow","slug":"http-response-status-response-statustext","errorCode":null,"errorMessage":"HTTP ${response.status}: ${response.statusText}","messagePattern":"HTTP (.+?): (.+?)","errorType":"exception","errorClass":"LarkIntegrationRequestError","httpStatus":null,"severity":"error","filePath":"frontend/src/core/integrations/lark/api.ts","lineNumber":47,"sourceCode":"  }\n}\n\nasync function readErrorDetail(response: Response): Promise<string> {\n  const data = (await response.json().catch(() => ({}))) as {\n    detail?: string;\n  };\n  return data.detail ?? `HTTP ${response.status}: ${response.statusText}`;\n}\n\nexport async function loadLarkIntegrationStatus(\n  signal?: AbortSignal,\n): Promise<LarkIntegrationStatus> {\n  const response = await fetch(\n    `${getBackendBaseURL()}/api/integrations/lark/status`,\n    { signal },\n  );\n  if (!response.ok) {\n    throw new LarkIntegrationRequestError(\n      response.status,\n      await readErrorDetail(response),\n    );\n  }\n  return response.json();\n}\n\nexport async function installLarkIntegration(): Promise<LarkInstallResponse> {\n  const response = await fetch(\n    `${getBackendBaseURL()}/api/integrations/lark/install`,\n    {\n      method: \"POST\",\n    },\n  );\n  if (!response.ok) {\n    throw new LarkIntegrationRequestError(\n      response.status,\n      await readErrorDetail(response),","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/frontend/src/core/integrations/lark/api.ts#L29-L65","documentation":"Raised when retrieval.top_k (search_top_k) falls outside [1, 100]. top_k bounds how many memory results are requested per search; zero would return nothing and values above 100 would strain both the service and the injection budget, so the range is enforced at config load.","triggerScenarios":"Setting retrieval.top_k: 0, a negative number, or a value above 100 under the openviking backend_config; also triggered by int() coercion of a malformed YAML scalar.","commonSituations":"Tuning recall up and overshooting (top_k: 200); trying to disable retrieval by setting 0 instead of switching the memory backend; misindented YAML nesting top_k at the wrong level so the default applies and the stray key trips the unknown-field error too.","solutions":["Set retrieval.top_k between 1 and 100 (default 8).","To reduce context usage, lower top_k or tighten score_threshold rather than zeroing it.","Confirm the key sits under retrieval: with correct indentation."],"exampleFix":"# before\nretrieval:\n  top_k: 200\n\n# after\nretrieval:\n  top_k: 50","handlingStrategy":"validation","validationCode":"def check_top_k(value: int) -> None:\n    assert isinstance(value, int) and 1 <= value <= 100, 'retrieval.top_k must be in [1, 100]'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Budget retrieval with top_k plus score_threshold together; do not zero either.","Keep top_k under retrieval: with correct YAML indentation.","Start from the default (8) and increase only with measured context headroom."],"tags":["openviking","configuration","validation","retrieval"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}