Significant-Gravitas/AutoGPT · error · Error
Unsupported import in artifact preview: ${name}
Error message
Unsupported import in artifact preview: ${name} What it means
ValueError raised inside _validate_resource_ownership when the active AgentGraph exists but its organizationId differs from the org the caller claims as the source. Transfer creation verifies the resource actually belongs to the source org to prevent transferring other orgs' graphs.
Source
Thrown at autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactPanel/components/reactArtifactPreview.ts:238
}
}
if (key !== undefined) props.key = key;
var children =
config != null && "children" in config ? config.children : undefined;
if (Array.isArray(children)) {
return React.createElement.apply(
null,
[type, props].concat(children),
);
}
return children === undefined
? React.createElement(type, props)
: React.createElement(type, props, children);
}
return { Fragment: React.Fragment, jsx: jsx, jsxs: jsx };
}
throw new Error("Unsupported import in artifact preview: " + name);
}
class PreviewErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = { error: null };
}
static getDerivedStateFromError(error) {
return { error };
}
render() {
if (this.state.error) {
const propsHelp =
this.props.componentExpectsProps && !this.props.hasPreviewProps
? "\\n\\nThis component appears to expect props. Export a named previewProps object with sample values to render it in artifact preview."
: "";View on GitHub (pinned to 9c8bb5550f)
Solutions
- Before creating the transfer, check the graph's organizationId equals the active org; otherwise prompt an org switch.
- Filter graph pickers to graphs owned by the currently active org.
- Re-fetch the graph and confirm ownership client-side before submission.
Example fix
# before
await create_transfer("AgentGraph", gid, source_org=active_org, ...)
# after
g = await get_graph(gid)
if g.organization_id != active_org:
raise PermissionError("Graph not owned by active org")
await create_transfer("AgentGraph", gid, source_org=active_org, ...) Defensive patterns
Strategy: type-guard
Validate before calling
g = await get_graph(resource_id)
if g.organization_id != active_org_id:
raise PermissionError("Graph not owned by active org") Type guard
def graph_owned_by_org(g: AgentGraphResponse, org_id: str) -> bool:
return g.organization_id == org_id Try / catch
try:
await create_transfer("AgentGraph", gid, ...)
except ValueError as e:
if "does not belong" in str(e):
prompt_org_switch()
else:
raise Prevention
- Scope graph pickers to the active org's owned graphs
- Verify ownership client-side before submitting the transfer
When it happens
Trigger: Creating a transfer with resourceType='AgentGraph' where the graph's owning org differs from the caller's active org — e.g. a multi-org user selecting a graph owned by org B while org A is active, or deliberately probing another org's graph id.
Common situations: Wrong active org selected in the UI; graph shared/visible across orgs but owned by another; copying a graph id from another workspace.
Related errors
- Failed to start OAuth flow
- Failed to fetch rate limit
- Failed to fetch artifact
- PKCE verifier not found in session
- Token exchange failed
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/0bc0c593eb05e25a.
Report an issue: GitHub.