Consistent error message casing.

This commit is contained in:
2026-09-27 22:04:49 +02:00
parent a67c67bbbd
commit caa57deaad
4 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -24,24 +24,24 @@ async fn main() -> anyhow::Result<()> {
.max_connections(5)
.connect(&database_url)
.await
.context("Failed to connect to database")?;
.context("failed to connect to database")?;
sqlx::migrate!()
.run(&pool)
.await
.context("Failed to run database migrations")?;
.context("failed to run database migrations")?;
let host = env::var("HOST").context("HOST must be set")?;
let port = env::var("PORT").context("PORT must be set")?;
let addr = format!("{}:{}", host, port);
let listener = TcpListener::bind(&addr)
.await
.context(format!("Failed to bind to address: {}", addr))?;
.context(format!("failed to bind to address: {}", addr))?;
tracing::info!(%addr, "Starting server");
tracing::info!(%addr, "starting server");
axum::serve(listener, routes::create_router(pool).into_make_service())
.await
.context("Server stopped unexpectedly")?;
.context("server stopped unexpectedly")?;
Ok(())
}