windmill-labs/windmill · error
Nested argument not found!
Error message
Nested argument not found!
What it means
Same traversal guard as 1335 but in AddPropertyV2.svelte: while walking `argPath` through the (Svelte 5 $state) schema's nested `properties`, a missing intermediate property name aborts the delete with this error.
Source
Thrown at frontend/src/lib/components/schema/AddPropertyV2.svelte:129
}
if (argError !== '') {
sendUserToast(argError, true)
}
}
export function handleDeleteArgument(argPath: string[], nschema?: Schema): void {
try {
let modifiedObject: Schema = { ...(nschema ?? schema) }
let modifiedProperties = modifiedObject.properties as object
let argName = argPath.pop() as string
argPath.forEach((property) => {
if (Object.keys(modifiedProperties).includes(property)) {
modifiedObject = modifiedProperties[property]
modifiedProperties = modifiedObject.properties as object
} else {
throw Error('Nested argument not found!')
}
})
if (Object.keys(modifiedProperties).includes(argName)) {
delete modifiedProperties[argName]
if (modifiedObject.required) {
modifiedObject.required = schema.required.filter((arg) => arg !== argName)
}
if (modifiedObject.order) {
modifiedObject.order = modifiedObject.order.filter((arg) => arg !== argName)
}
} else {
throw Error('Argument not found!')
}
syncOrders(modifiedObject)
schema = $state.snapshot(modifiedObject)
} catch (err) {View on GitHub (pinned to e474e8803c)
Solutions
- Refresh the schema editor and retry
- Confirm the nested parent object still exists with the exact name in argPath
- Rebuild the delete action from the current UI selection rather than a stored path
- Edit the schema JSON directly to remove the nested property
Example fix
// defensive traversal
for (const property of argPath) {
if (!(property in (modifiedProperties ?? {}))) { await reloadSchema(); return; }
modifiedObject = modifiedProperties[property];
modifiedProperties = modifiedObject.properties;
} Defensive patterns
Strategy: type-guard
Validate before calling
let node = $state.snapshot(schema);
for (const seg of argPath) {
if (!node?.properties?.[seg]) { console.warn('Stale nested path:', seg); return; }
node = node.properties[seg];
} Type guard
function nestedPathExists(schema: any, path: string[]): boolean {
let node = schema;
for (const seg of path) {
if (!node?.properties || !(seg in node.properties)) return false;
node = node.properties[seg];
}
return true;
} Try / catch
try { await handleDeleteArgument(arg); } catch (e) {
if (/Nested argument not found/.test(String(e))) await reloadSchema();
else throw e;
} Prevention
- Use $state.snapshot() before traversing to avoid proxies/stale reads
- Reload the schema after external edits or undo/redo
- Prevent concurrent editors on the same schema
When it happens
Trigger: Deleting a nested argument when the schema no longer contains one of the intermediate objects in argPath — parent deleted, renamed, or schema snapshot out of sync with the UI tree.
Common situations: Edits made in another tab or by a collaborator, external schema replacement, or stale argPath after undo/redo in the V2 schema editor.
Related errors
- Nested argument not found!
- Argument not found!
- Argument not found!
- Column ${column.field} is not nullable and has no default va
- BigQuery requires a dataset (schema) name
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/0bd66711f712468a.
Report an issue: GitHub.