bytedance/deer-flow · error · HTTPException
Failed to get Lark integration status.
Error message
Failed to get Lark integration status.
What it means
Raised by GET /integrations/lark/status with status 500 when get_lark_integration_status(...) raises an unexpected exception (run in a thread via asyncio.to_thread with check_latest and check_runtime enabled). The real cause is logged with traceback ('Failed to get Lark integration status'); the 500 is a generic catch-all for probe failures such as filesystem errors or network checks to Lark/Feishu APIs.
Source
Thrown at backend/app/gateway/routers/integrations.py:266
)
def _auth_complete_to_response(result: LarkAuthCompleteResult, *, include_host_paths: bool = True) -> LarkAuthCompleteResponse:
return LarkAuthCompleteResponse(
success=result.success,
message=result.message,
status=_status_to_response(result.status, include_host_paths=include_host_paths),
)
@router.get("/lark/status", response_model=LarkIntegrationStatusResponse, summary="Get Lark/Feishu Integration Status")
async def get_lark_status(request: Request, config: AppConfig = Depends(get_config)) -> LarkIntegrationStatusResponse:
try:
status = await asyncio.to_thread(get_lark_integration_status, get_effective_user_id(), config, check_latest=True, check_runtime=True)
return _status_to_response(status, include_host_paths=await _is_admin_user(request))
except Exception as e:
logger.error("Failed to get Lark integration status: %s", e, exc_info=True)
raise HTTPException(status_code=500, detail="Failed to get Lark integration status.")
@router.post("/lark/install", response_model=LarkInstallResponse, summary="Install Lark/Feishu Skill Pack")
async def install_lark(request: Request, config: AppConfig = Depends(get_config)) -> LarkInstallResponse:
await require_admin_user(request, detail=_ADMIN_REQUIRED_DETAIL)
try:
result = await asyncio.to_thread(install_lark_integration, get_effective_user_id(), config)
await refresh_skills_system_prompt_cache_async()
return _install_to_response(result)
except FileNotFoundError as e:
raise HTTPException(status_code=404, detail=str(e))
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
except HTTPException:
raise
except Exception as e:
logger.error("Failed to install Lark integration: %s", e, exc_info=True)
raise HTTPException(status_code=500, detail="Failed to install Lark integration.")View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Read the Gateway log line 'Failed to get Lark integration status: ...' — the chained exception identifies the failing check.
- Verify the integrations directory (.deer-flow/integrations/skills/...) is present, complete, and readable by the Gateway user.
- If outbound network is restricted, allow or accept degradation of the latest-version/runtime checks rather than relying on this endpoint.
Defensive patterns
Strategy: try-catch
Try / catch
try { status = await getLarkStatus(); } catch (e) { if (e.status === 500) { console.warn('Lark status probe failed — see gateway logs'); status = { available: false, degraded: true }; } else throw e; } Prevention
- Keep the integrations directory complete and readable
- Ensure egress to Lark APIs or accept degraded status checks
- Correlate with the 'Failed to get Lark integration status' log line for the root cause
When it happens
Trigger: The status probe hitting the Lark open platform API while egress is blocked; missing/corrupt skill-pack files under .deer-flow/integrations; permission errors reading the integration directory; unexpected payload shapes from Lark endpoints breaking the checker.
Common situations: Air-gapped or proxied environments where check_latest (version check) can't reach the internet; partially-installed or manually-edited integration skill packs; OS user lacking read permissions on the integrations directory.
Related errors
- Failed to install Lark integration.
- Failed to start Lark connection setup.
- Failed to complete Lark connection setup.
- Failed to switch Lark app credentials.
- Failed to start Lark authorization.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/cf731cdbb47a56c4.
Report an issue: GitHub.