mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Expose more information for migration status errors (#240)
We saw these errors live today and it would be helpful to have the additional error context for debugging.
This commit is contained in:
parent
bb124dc2b9
commit
ac9a85ab88
1 changed files with 4 additions and 4 deletions
|
|
@ -193,22 +193,22 @@ func (d *Datastore) MigrationStatus() (kolide.MigrationStatus, error) {
|
|||
|
||||
lastTablesMigration, err := tables.MigrationClient.Migrations.Last()
|
||||
if err != nil {
|
||||
return 0, errors.New("missing tables migrations")
|
||||
return 0, errors.Wrap(err, "missing tables migrations")
|
||||
}
|
||||
|
||||
currentTablesVersion, err := tables.MigrationClient.GetDBVersion(d.db.DB)
|
||||
if err != nil {
|
||||
return 0, errors.New("cannot get table migration status")
|
||||
return 0, errors.Wrap(err, "cannot get table migration status")
|
||||
}
|
||||
|
||||
lastDataMigration, err := data.MigrationClient.Migrations.Last()
|
||||
if err != nil {
|
||||
return 0, errors.New("missing data migrations")
|
||||
return 0, errors.Wrap(err, "missing data migrations")
|
||||
}
|
||||
|
||||
currentDataVersion, err := data.MigrationClient.GetDBVersion(d.db.DB)
|
||||
if err != nil {
|
||||
return 0, errors.New("cannot get table migration status")
|
||||
return 0, errors.Wrap(err, "cannot get data migration status")
|
||||
}
|
||||
|
||||
switch {
|
||||
|
|
|
|||
Loading…
Reference in a new issue