Significant-Gravitas/AutoGPT · error · NotFoundError

Graph #{current.graph_id} is not accessible (anymore)

Error message

Graph #{current.graph_id} is not accessible (anymore)

What it means

NotFoundError raised by update_preset_with_webhook_reconfiguration when both inputs and credentials are supplied (triggering webhook re-registration) but the preset's parent graph can no longer be fetched via get_graph. The preset row exists, but its graph was deleted or became inaccessible, so reconfiguring the trigger is impossible. Note this path only triggers when inputs AND credentials are both non-None.

Source

Thrown at autogpt_platform/backend/backend/api/features/library/triggers.py:136

    graph has a webhook trigger node, the webhook is re-registered with the new
    config and the previously-attached webhook is pruned if it becomes dangling.
    Name/description/active-status changes don't touch the webhook.

    Raises:
        NotFoundError: if the preset (or, when reconfiguring, its graph) is gone.
        InvalidInputError: if the webhook backend rejects the new trigger config.
    """
    current = await db.get_preset(user_id, preset_id)
    if not current:
        raise NotFoundError(f"Preset #{preset_id} not found")

    trigger_inputs_updated, new_webhook = False, None
    if inputs is not None and credentials is not None:
        graph = await get_graph(
            current.graph_id, current.graph_version, user_id=user_id
        )
        if not graph:
            raise NotFoundError(
                f"Graph #{current.graph_id} is not accessible (anymore)"
            )
        if trigger_node := graph.webhook_input_node:
            trigger_config_with_credentials = {
                **inputs,
                **(
                    make_node_credentials_input_map(graph, credentials).get(
                        trigger_node.id
                    )
                    or {}
                ),
            }
            new_webhook, feedback = await setup_webhook_for_block(
                user_id=user_id,
                trigger_block=trigger_node.block,
                trigger_config=trigger_config_with_credentials,
                for_preset_id=preset_id,
                # Resource-follows-parent: webhook lives in the graph's org/team.

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Check the parent graph: GET /graphs/{graph_id}?version={graph_version} — if gone, the preset is effectively orphaned.
  2. Delete and recreate the preset against an existing graph version instead of reconfiguring the orphan.
  3. If only reconfiguring metadata, omit inputs/credentials to bypass the graph lookup entirely.
  4. Fix upstream data hygiene: ensure graph deletion also removes or flags its presets.

Example fix

# before
await update_preset_with_webhook_reconfiguration(user_id=uid, preset_id=pid, inputs=inp, credentials=creds, name=new_name)
# after
if inp is None or creds is None:  # metadata-only update, no graph needed
    await update_preset_with_webhook_reconfiguration(user_id=uid, preset_id=pid, name=new_name)
else:
    graph = await get_graph(preset.graph_id, preset.graph_version, user_id=uid)
    if not graph:
        raise OrphanedPreset(pid)
    await update_preset_with_webhook_reconfiguration(user_id=uid, preset_id=pid, inputs=inp, credentials=creds, name=new_name)
Defensive patterns

Strategy: validation

Validate before calling

if inputs is not None and credentials is not None:
    graph = await get_graph(preset.graph_id, preset.graph_version, user_id=uid)
    if not graph:
        raise OrphanedPreset(preset_id)

Try / catch

try:
    await update_preset_with_webhook_reconfiguration(...)
except NotFoundError as e:
    if 'not accessible' in str(e):
        raise OrphanedPreset('recreate the preset against an existing graph') from e
    raise

Prevention

When it happens

Trigger: PATCH with inputs+credentials on a preset whose graph was deleted; graph moved to another org/visibility; pinned graph_version pruned. Name/description/isActive-only updates never hit this error.

Common situations: Orphaned presets surviving graph deletion; graph ownership transferred; version cleanup job removed the referenced version.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/6d8cb5ec3e56d5fe. Report an issue: GitHub.