siyuan-note/siyuan · error

%w; cleanup failed: %v

Error message

%w; cleanup failed: %v

What it means

Error "%w; cleanup failed: %v" thrown in siyuan-note/siyuan.

Source

Thrown at kernel/model/attribute_view_new_item.go:613

}

func applyNewItemContentTemplate(templatePath, docID string) error {
	return applyDocContentTemplateAfterIndex(templatePath, docID)
}

func removeCreatedNewItemDoc(docID string) error {
	blockTree := treenode.GetBlockTree(docID)
	if nil == blockTree {
		return nil
	}
	return RemoveDoc(blockTree.BoxID, blockTree.Path)
}

func newItemCreationError(createErr, cleanupErr error) error {
	if nil == cleanupErr {
		return createErr
	}
	return fmt.Errorf("%w; cleanup failed: %v", createErr, cleanupErr)
}

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Address the primary error first (the part before the semicolon); then manually remove any leftover partially-created row or document.
  2. Check the kernel log for both errors and re-run the operation after cleanup.

Example fix

Delete the orphaned row/document left by the failed creation, then retry the original operation.

When it happens

Trigger: Creating an attribute view item failed and the automatic rollback of the partially created row/document also failed.

Common situations: Occurs when row creation fails partway and the rollback cleanup of the partially created documents also fails.


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/63a75b2d734cb466. Report an issue: GitHub.