fix: serialize property writes and expose n8n results
Build and Push Docker Container / build-and-push (push) Successful in 3m31s
Build and Push Docker Container / build-and-push (push) Successful in 3m31s
- Serialize property set and remove commands per vault note to avoid lost frontmatter writes. - Wait briefly for successful property writes to hit disk before releasing the note lock. - Return property path, name, value, type, operation, and ok status in n8n outputs. - Include property details on continue-on-fail errors so failed items are visible in n8n. - Bump obsidian-api to 1.0.7 and n8n-nodes-obsidian-cli-api to 0.2.8. - Add regression coverage for concurrent property writes to the same note.
This commit is contained in:
@@ -31,7 +31,20 @@ export class ObsidianApi implements INodeType {
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
returnData.push({ json: { error: message }, pairedItem: { item: itemIndex } });
|
||||
const resource = this.getNodeParameter('resource', itemIndex, '') as string;
|
||||
const operation = this.getNodeParameter('operation', itemIndex, '') as string;
|
||||
const failure = resource === 'property'
|
||||
? {
|
||||
ok: false,
|
||||
operation,
|
||||
path: this.getNodeParameter('propertyPath', itemIndex, '') as string,
|
||||
property: this.getNodeParameter('propertyName', itemIndex, '') as string,
|
||||
value: this.getNodeParameter('propertyValue', itemIndex, '') as string,
|
||||
type: this.getNodeParameter('propertyType', itemIndex, '') as string,
|
||||
error: message,
|
||||
}
|
||||
: { ok: false, error: message };
|
||||
returnData.push({ json: failure, pairedItem: { item: itemIndex } });
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user