From 6fcb1542fed2728e9dfdf141aa013903bae072f5 Mon Sep 17 00:00:00 2001 From: calyptobai Date: Wed, 29 Nov 2023 08:40:25 -0500 Subject: [PATCH] Capture migration errors in Sentry We switch from a warning to an error, so that our sentry tracing layer will track this as an exception. --- server/bleep/src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/bleep/src/db.rs b/server/bleep/src/db.rs index e7efacccc6..460685cb22 100644 --- a/server/bleep/src/db.rs +++ b/server/bleep/src/db.rs @@ -2,7 +2,7 @@ use std::{path::Path, sync::Arc}; use anyhow::{Context, Result}; use sqlx::SqlitePool; -use tracing::{debug, warn}; +use tracing::{debug, error}; use crate::Configuration; @@ -22,7 +22,7 @@ pub async fn initialize(config: &Configuration) -> Result { Ok(pool) } Err(e) => { - warn!(?e, "error while migrating, recreating database..."); + error!(?e, "error while migrating, recreating database..."); reset(&data_dir)?; debug!("reset complete");