{"record":{"id":"db4a9f8545683264","repo":"Significant-Gravitas/AutoGPT","slug":"block-block-id-is-disabled","errorCode":null,"errorMessage":"Block #{block_id} is disabled.","messagePattern":"Block #(.+?) is disabled\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"autogpt_platform/backend/backend/api/external/v1/routes.py","lineNumber":106,"sourceCode":"async def execute_graph_block(\n    block_id: str,\n    data: BlockInput,\n    auth: APIAuthorizationInfo = Security(\n        require_permission(APIKeyPermission.EXECUTE_BLOCK)\n    ),\n) -> CompletedBlockOutput:\n    # Sync block exec doesn't pass through ``add_graph_execution`` (no\n    # central enqueue), and external API routes use API-key auth instead\n    # of JWT so the JWT-based dep doesn't apply either. Inline strict\n    # gate with the same fail-closed (503-on-blip) posture as the dep —\n    # consistent with chat / internal block / internal graph routes.\n    await enforce_payment_paywall(auth.user_id)\n\n    obj = backend.blocks.get_block(block_id)\n    if not obj:\n        raise HTTPException(status_code=404, detail=f\"Block #{block_id} not found.\")\n    if obj.disabled:\n        raise HTTPException(status_code=403, detail=f\"Block #{block_id} is disabled.\")\n\n    user = await user_db.get_user_by_id(auth.user_id)\n    if not user:\n        raise HTTPException(status_code=404, detail=\"User not found.\")\n\n    try:\n        await charge_for_direct_block_execution(\n            user_id=auth.user_id, block=obj, input_data=data, source=\"external\"\n        )\n    except InsufficientBalanceError as e:\n        raise HTTPException(\n            status_code=status.HTTP_402_PAYMENT_REQUIRED, detail=str(e)\n        ) from e\n\n    # Direct block execution has no graph; build a minimal ExecutionContext\n    # carrying the caller's identity + timezone so blocks that depend on\n    # those (e.g. time blocks) get correct data.\n    execution_context = ExecutionContext(","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/external/v1/routes.py#L88-L124","documentation":"Raised (HTTP 403) by the external execute-block endpoint when the requested block exists but its `disabled` flag is set. Disabled blocks are registered but barred from execution platform-wide (e.g. deprecation, security hold, or operator opt-out), so the request is refused before any charging or execution.","triggerScenarios":"POST `/blocks/{block_id}/execute` for a block whose `disabled=True` in the registry — typically a deprecated block or one disabled by the platform operators.","commonSituations":"A block was deprecated in a newer release while old graphs/scripts still reference it; operators disable a block due to a vulnerability; beta blocks disabled by default in some deployments.","solutions":["Check the block catalog for an enabled replacement block and migrate inputs to its schema.","If you operate the platform and need the block, flip its `disabled` flag in code/config and redeploy.","Pin your automation to block versions/ids validated for `disabled == false` before executing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"blocks = {b[\"id\"]: b for b in client.get(\"/blocks\").json()}\nb = blocks.get(block_id)\nif b is None:\n    raise UnknownBlock(block_id)\nif b.get(\"disabled\"):\n    replacement = find_replacement(blocks, b)  # same category, enabled\n    raise BlockDisabled(f\"use {replacement['id']} instead\")","typeGuard":null,"tryCatchPattern":"try:\n    client.post(f\"/blocks/{block_id}/execute\", json=data)\nexcept HTTPError as e:\n    if e.response.status_code == 403 and \"disabled\" in e.response.text:\n        raise BlockDisabled(block_id)  # pick an enabled replacement from catalog\n    raise","preventionTips":["Check the catalog's disabled flag before executing; migrate off deprecated blocks when flagged.","Subscribe to platform release notes for block deprecations."],"tags":["blocks","disabled","forbidden","deprecation"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}