Skip to content

Commit

Permalink
fix(sql): more explicit error if no driver is enabled (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Nov 13, 2024
1 parent 90ef77c commit d402c38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/sql/src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ impl DbPool {
}
Ok(Self::Postgres(Pool::connect(conn_url).await?))
}
#[cfg(not(any(feature = "sqlite", feature = "postgres", feature = "mysql")))]
_ => Err(crate::Error::InvalidDbUrl(format!(
"{conn_url} - No database driver enabled!"
))),
#[cfg(any(feature = "sqlite", feature = "postgres", feature = "mysql"))]
_ => Err(crate::Error::InvalidDbUrl(conn_url.to_string())),
}
}
Expand Down

0 comments on commit d402c38

Please sign in to comment.