server format
This commit is contained in:
1 parent
117a2e00c4
commit
e79bf28bdc
4 files changed
+16
-24
No files matched your search
@@ -32,11 +32,7 @@ const runMigrations = async (logger?: { info: Function; error: Function }) => {
|
||||
logger?.info({ message: `Completed ${migration.name}`, service: "Migrations" });
|
||||
} catch (error) {
|
||||
const err = error as Error;
|
||||
await MigrationModel.findOneAndUpdate(
|
||||
{ name: migration.name },
|
||||
{ status: "failed", error: err?.message },
|
||||
{ upsert: true }
|
||||
);
|
||||
await MigrationModel.findOneAndUpdate({ name: migration.name }, { status: "failed", error: err?.message }, { upsert: true });
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user