{"record":{"id":"e172acf1bba8f8d0","repo":"Significant-Gravitas/AutoGPT","slug":"preset-preset-id-not-found","errorCode":null,"errorMessage":"Preset #{preset_id} not found","messagePattern":"Preset #(.+?) not found","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/library/db.py","lineNumber":2195,"sourceCode":"        updated = await prisma.models.AgentPreset.prisma(tx).update(\n            where={\"id\": preset_id},\n            data=update_data,\n            include=AGENT_PRESET_INCLUDE,\n        )\n    if not updated:\n        raise RuntimeError(f\"AgentPreset #{preset_id} vanished while updating\")\n    return library_model.LibraryAgentPreset.from_db(updated)\n\n\nasync def set_preset_webhook(\n    user_id: str, preset_id: str, webhook_id: str | None\n) -> library_model.LibraryAgentPreset:\n    current = await prisma.models.AgentPreset.prisma().find_unique(\n        where={\"id\": preset_id},\n        include=AGENT_PRESET_INCLUDE,\n    )\n    if not current or current.userId != user_id:\n        raise NotFoundError(f\"Preset #{preset_id} not found\")\n\n    # Refuse to attach a webhook the caller doesn't own\n    if webhook_id:\n        webhook = await integrations_db.get_webhook(webhook_id)\n        if webhook.user_id != user_id:\n            raise NotFoundError(f\"Webhook #{webhook_id} not found\")\n\n    updated = await prisma.models.AgentPreset.prisma().update(\n        where={\"id\": preset_id},\n        data=(\n            {\"Webhook\": {\"connect\": {\"id\": webhook_id}}}\n            if webhook_id\n            else {\"Webhook\": {\"disconnect\": True}}\n        ),\n        include=AGENT_PRESET_INCLUDE,\n    )\n    if not updated:\n        raise RuntimeError(f\"AgentPreset #{preset_id} vanished while updating\")","sourceCodeStart":2177,"sourceCodeEnd":2213,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/library/db.py#L2177-L2213","documentation":"Error \"Preset #{preset_id} not found\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/library/db.py:2195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the preset ID exists and belongs to your account.","Refresh presets and retry the operation."],"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-15T17:31:12.345Z"}