diff --git a/packages/backend/src/db/migrations/20220904160521_add_raw_error_to_execution_steps.ts b/packages/backend/src/db/migrations/20220904160521_add_raw_error_to_execution_steps.ts new file mode 100644 index 00000000..55eb25c2 --- /dev/null +++ b/packages/backend/src/db/migrations/20220904160521_add_raw_error_to_execution_steps.ts @@ -0,0 +1,13 @@ +import { Knex } from 'knex'; + +export async function up(knex: Knex): Promise { + return knex.schema.table('execution_steps', (table) => { + table.jsonb('error_details'); + }); +} + +export async function down(knex: Knex): Promise { + return knex.schema.table('execution_steps', (table) => { + table.dropColumn('error_details'); + }); +} diff --git a/packages/backend/src/models/execution-step.ts b/packages/backend/src/models/execution-step.ts index fb94b7ab..88f971dc 100644 --- a/packages/backend/src/models/execution-step.ts +++ b/packages/backend/src/models/execution-step.ts @@ -10,6 +10,7 @@ class ExecutionStep extends Base { stepId!: string; dataIn!: Record; dataOut!: Record; + errorDetails: Record; status = 'failure'; step: Step; @@ -25,6 +26,7 @@ class ExecutionStep extends Base { dataIn: { type: 'object' }, dataOut: { type: 'object' }, status: { type: 'string', enum: ['success', 'failure'] }, + errorDetails: { type: ['object', 'null'] }, }, };