Skip to content

Error Reference

This page covers all error conditions you may encounter when integrating FlowDrop: mount exceptions, API errors during operation, and Agent Spec validation failures.

mountFlowDropApp() throws synchronously if the mount cannot proceed.

Error messageCauseFix
Container element not foundThe selector or element passed to container does not exist in the DOMEnsure the container element exists before calling mountFlowDropApp()
Container has no dimensionsThe container element has zero width or heightApply width and height (or min-height) to the container via CSS before mounting
FlowDrop CSS not importedThe base styles from @flowdrop/flowdrop/styles were not loadedImport @flowdrop/flowdrop/styles before mounting
Cannot mount in server-side contextmountFlowDropApp() was called during SSR (no window object)Guard the call with if (typeof window !== 'undefined') — see Framework Integration
// Safe mount pattern
if (typeof window !== 'undefined') {
const app = mountFlowDropApp({
container: document.getElementById('editor')
// ...
});
}

FlowDrop calls your REST API during normal operation. Use the onApiError event handler to intercept these errors.

mountFlowDropApp({
container: document.getElementById('editor'),
endpoints: createEndpointConfig('/api/flowdrop'),
onApiError: (error) => {
// error.status — HTTP status code (0 for network errors)
// error.operation — what FlowDrop was doing when the error occurred
// error.message — error description
// error.response — raw Response object (if available)
if (error.status === 401) {
// Redirect to login
window.location.href = '/login';
return true; // return true to suppress the default toast notification
}
// Return false (or nothing) to show the default error toast
return false;
}
});
StatusCauseRecommended action
0Network error — no response receivedCheck server is running; show connectivity warning
401Unauthorized — missing or expired credentialsRedirect to login or refresh token
403Forbidden — authenticated but not allowedShow permission error; do not redirect
404Endpoint not found — wrong URL configuredVerify your endpoints configuration
422Validation error — malformed workflow JSONLog error.response body for details
500Server errorLog and surface to user; offer retry

The error.operation field tells you what FlowDrop was doing when the error occurred:

ValueTrigger
loadNodesInitial GET /nodes request on mount
loadWorkflowGET /workflows/:id on mount
saveWorkflowPOST /workflows or PUT /workflows/:id on save
loadPortConfigGET /port-config for dynamic port compatibility
executeWorkflowPOST /execute (if using the playground)

onSaveError is a separate handler called when a save operation fails. It receives the workflow object that failed to save, allowing you to recover or retry.

mountFlowDropApp({
container: document.getElementById('editor'),
onSaveError: async (error, workflow) => {
console.error('Save failed:', error);
// workflow is the StandardWorkflow object that failed to persist
// You can store it locally or retry:
localStorage.setItem('flowdrop-save-fallback', JSON.stringify(workflow));
}
});

When exporting a workflow to Agent Spec format via WorkflowOperationsHelper.exportAsAgentSpec(), the result object indicates success or failure:

const result = WorkflowOperationsHelper.exportAsAgentSpec(workflow);
// result: { valid: boolean, errors: string[], warnings: string[] }
if (!result.valid) {
console.error('Export failed:', result.errors);
}
Error messageCauseFix
Workflow has no nodesThe workflow is emptyAdd at least one node before exporting
Cycle detectedThe workflow graph contains a loopRemove cyclic connections; Agent Spec requires a DAG
Node type not mappable: <type>A custom node type has no Agent Spec equivalentMap custom types to Agent Spec actions in your export config
Disconnected node: <id>A node has no edgesConnect all nodes or remove unused ones
Missing required port: <port>A required input port has no incoming edgeConnect the required port before exporting

Warnings (non-fatal) indicate information that may be lost in the export, such as FlowDrop-specific configuration fields that have no Agent Spec equivalent.