1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00

Merge pull request #13887 from Budibase/fix/better-migration-logging

Improving error logging of app migration system
This commit is contained in:
Michael Drury 2024-06-07 18:15:39 +01:00 committed by GitHub
commit b37dcf45ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
import { context, locks } from "@budibase/backend-core"
import { context, locks, logging } from "@budibase/backend-core"
import { LockName, LockType } from "@budibase/types"
import {
@ -20,6 +20,7 @@ export async function processMigrations(
resource: appId,
},
async () => {
try {
await context.doInAppMigrationContext(appId, async () => {
let currentVersion = await getAppMigrationVersion(appId)
@ -51,6 +52,10 @@ export async function processMigrations(
currentVersion = id
}
})
} catch (err) {
logging.logAlert("Failed to run app migration", err)
throw err
}
}
)