{"record":{"id":"e28302473fe861ee","repo":"Significant-Gravitas/AutoGPT","slug":"ratification-pass-failed-type-exc-name-e","errorCode":null,"errorMessage":"Ratification pass failed: {type(exc).__name__}: {exc}","messagePattern":"Ratification pass failed: (.+?): (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/admin/memory_admin_routes.py","lineNumber":845,"sourceCode":"        target_id=target,\n        jwt_payload=jwt_payload,\n    )\n    try:\n        derive_group_id(target)\n    except ValueError as exc:\n        raise HTTPException(status_code=400, detail=str(exc))\n\n    try:\n        result = await get_scheduler_client().execute_ratification_pass_now(\n            user_id=target\n        )\n    except Exception as exc:\n        logger.warning(\n            \"Admin-triggered ratification pass failed for user %s: %s\",\n            target[:12],\n            exc,\n        )\n        raise HTTPException(\n            status_code=500,\n            detail=f\"Ratification pass failed: {type(exc).__name__}: {exc}\",\n        )\n    return RatificationResult.model_validate(result)\n\n\n@router.post(\n    \"/{user_id}/nightly\",\n    response_model=JobTriggerResponse,\n    status_code=202,\n)\nasync def trigger_nightly_batch(\n    request: Request,\n    user_id: Annotated[str, Path(description=\"User id or 'me'\")],\n    caller_id: Annotated[str, Depends(get_user_id)],\n    jwt_payload: Annotated[dict, Security(get_jwt_payload)],\n) -> JSONResponse:\n    \"\"\"Fire the full nightly batch fan-out and return 202 + job_id immediately.","sourceCodeStart":827,"sourceCodeEnd":863,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/admin/memory_admin_routes.py#L827-L863","documentation":"HTTP 500 raised when the synchronous ratification pass call get_scheduler_client().execute_ratification_pass_now(user_id=target) throws. Unlike the fire-and-forget endpoints there is no job row; the exception class name and message are embedded in the 500 detail and a warning with the target id prefix is logged.","triggerScenarios":"POST /{user_id}/ratification passes validation, but the scheduler-side ratification sweep raises — scheduler service down/unreachable, FalkorDB/graph backend connection failure during the sweep, or an unexpected error inside the ratification logic itself.","commonSituations":"FalkorDB not running or wrong host/port credentials in graphiti config; scheduler running a different version whose RPC signature changed; transient DB timeouts during large sweeps; local dev where only part of docker-compose stack is up.","solutions":["Read the backend log line 'Admin-triggered ratification pass failed for user ...' — it carries the true exception","Verify scheduler and FalkorDB services are up and reachable from the API process (docker compose ps, connection env vars)","Fix or wait out the underlying cause, then retry the POST — the operation is stateless from the API side","If it persists, run the sweep manually via the scheduler to isolate whether the fault is in transport or in the pass logic"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = await client.post(f\"/memory/{uid}/ratification\")\nexcept httpx.HTTPStatusError as e:\n    if e.response.status_code == 500:\n        # detail embeds root exception type; check backend log for full cause\n        ...\n    raise","preventionTips":["Ensure scheduler and FalkorDB are healthy before invoking the synchronous pass","Expect this call to be slow — size client timeouts accordingly so you don't misread timeouts as 500s","Alert on the 'Admin-triggered ratification pass failed' log line"],"tags":["http-500","ratification","scheduler","falkordb"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}