{"record":{"id":"b207e0dcf32288de","repo":"Significant-Gravitas/AutoGPT","slug":"preset-preset-id-not-found-for-user-user-id","errorCode":null,"errorMessage":"Preset #{preset_id} not found for user #{user_id}","messagePattern":"Preset #(.+?) not found for user #(.+?)","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2141,"sourceCode":"    Args:\n        user_id: The ID of the user updating the preset.\n        preset_id: The ID of the preset to update.\n        inputs: New inputs object to set on the preset.\n        credentials: New credentials to set on the preset.\n        name: New name for the preset.\n        description: New description for the preset.\n        is_active: New active status for the preset.\n\n    Returns:\n        The updated LibraryAgentPreset.\n\n    Raises:\n        DatabaseError: If there's a database error in updating the preset.\n        NotFoundError: If attempting to update a non-existent preset.\n    \"\"\"\n    current = await get_preset(user_id, preset_id)  # assert ownership\n    if not current:\n        raise NotFoundError(f\"Preset #{preset_id} not found for user #{user_id}\")\n    logger.debug(\n        f\"Updating preset #{preset_id} ({repr(current.name)}) for user #{user_id}\",\n    )\n    async with transaction() as tx:\n        update_data: prisma.types.AgentPresetUpdateInput = {}\n        if name:\n            update_data[\"name\"] = name\n        if description:\n            update_data[\"description\"] = description\n        if is_active is not None:\n            update_data[\"isActive\"] = is_active\n        if inputs or credentials:\n            if not (inputs and credentials):\n                raise ValueError(\n                    \"Preset inputs and credentials must be provided together\"\n                )\n            update_data[\"InputPresets\"] = {\n                \"create\": [","sourceCodeStart":2123,"sourceCodeEnd":2159,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L2123-L2159","documentation":"Error \"Preset #{preset_id} not found for user #{user_id}\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the preset ID is correct and belongs to your account.","Refresh the preset list; it may have been deleted."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}