diff --git a/src/migrate.ts b/src/migrate.ts index e00807b..fb80f5d 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -147,7 +147,7 @@ function runMigrations(intendedMigrations: Array, log: Logger) { const error: MigrationError = new Error( `Migration failed. Reason: ${e.message}`, ) - error.cause = e + error.reason = e throw error } } diff --git a/src/types.ts b/src/types.ts index 5e16f9a..3f60dfe 100644 --- a/src/types.ts +++ b/src/types.ts @@ -62,7 +62,7 @@ export interface FullConfig { } export class MigrationError extends Error { - public cause?: string + public reason?: string } export type FileType = "sql" | "js"