bytedance/deer-flow · error · HTTPException
{str(e)}
Error message
{str(e)} What it means
Raised by POST /integrations/lark/install (admin-only) with status 404 when install_lark_integration raises FileNotFoundError. The integration installer couldn't locate a required file — typically the skill-pack source files or install manifest — so the message detail surfaces the missing path verbatim via str(e).
Source
Thrown at backend/app/gateway/routers/integrations.py:277
@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.")
@router.post("/lark/config/start", response_model=LarkConfigStartResponse, summary="Start Lark/Feishu App Configuration")
async def start_lark_app_config(body: LarkConfigStartRequest) -> LarkConfigStartResponse:
try:
result = await asyncio.to_thread(
start_lark_config,
get_effective_user_id(),
brand=body.brand,
)
return _config_start_to_response(result)View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Read the 404 detail — it names the exact missing file path.
- Restore the missing asset: rebuild/re-pull the deployment image, re-run setup (make install / make config), or reinstall the skill pack sources.
- Verify the directory the installer reads from exists and matches the version of the Gateway code.
Example fix
# before # image built with integrations dir excluded POST /api/integrations/lark/install -> 404 FileNotFoundError: /opt/deer-flow/.../lark-pack # after docker compose build --no-cache gateway && docker compose up -d POST /api/integrations/lark/install -> 200
Defensive patterns
Strategy: try-catch
Validate before calling
# preflight: the installer's source assets exist stat /opt/deer-flow/backend/extensions/sources || echo 'integration sources missing — rebuild image'
Try / catch
try { await installLark(); } catch (e) { if (e.status === 404) throw new Error(`Missing asset: ${e.detail} — rebuild/reinstall deployment`); throw e; } Prevention
- Build images with the integration assets included
- Read the 404 detail — it names the exact missing path
- Run make install/setup after cloning or upgrading
When it happens
Trigger: Installing the Lark skill pack when the packaged skill files are absent (incomplete deployment, stripped container image); the installer's expected directory (e.g. the managed integrations path) doesn't exist because first-run initialization never happened; files deleted or moved by an operator.
Common situations: Slim Docker images that excluded the integration assets; cloning the repo without submodules/artifacts; manual cleanup of .deer-flow/ breaking expected paths; version mismatch between app code and shipped skill pack.
Related errors
- Failed to get Lark integration status.
- Failed to install Lark integration.
- Thread {thread_id} not found
- Agent '{name}' not found
- Artifact not found: {path}
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/a27d7e53ba43d413.
Report an issue: GitHub.