refactor(core): Improve top-level key validation in task runner (#16882)

This commit is contained in:
Iván Ovejero
2025-07-03 08:58:58 +02:00
committed by GitHub
parent 4813c011ec
commit 8aecd327c6
4 changed files with 74 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
import { ValidationError } from './validation-error';
export class ReservedKeyFoundError extends ValidationError {
constructor(reservedKey: string, itemIndex: number) {
super({
message: 'Invalid output format',
description: `An output item contains the reserved key <code>${reservedKey}</code>. To get around this, please wrap each item in an object, under a key called <code>json</code>. <a href="https://docs.n8n.io/data/data-structure/#data-structure" target="_blank">Example</a>`,
itemIndex,
});
}
}