Skip to content

Commit

Permalink
remove confusing error message when a migration is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Sep 30, 2023
1 parent e9f1bee commit 2ca68a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/webserver/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ pub async fn apply_migrations(db: &Database) -> anyhow::Result<()> {
m.description
);
}
migrator
.run(&db.connection)
.await
.with_context(|| migration_err("running the migration"))?;
migrator.run(&db.connection).await.with_context(|| {
format!("There is an error in the database migrations in {MIGRATIONS_DIR:?}")
})?;
Ok(())
}

Expand Down

0 comments on commit 2ca68a5

Please sign in to comment.