fix(api): gate AppError helper methods behind server feature
tracing is an optional dependency unavailable in WASM builds. The constructors are only called from server-side code anyway.
This commit is contained in:
parent
bf401e4916
commit
2574e1e315
@ -11,6 +11,7 @@ pub enum AppError {
|
||||
Internal(&'static str),
|
||||
}
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
impl AppError {
|
||||
pub fn db_conn(e: impl std::fmt::Display) -> Self {
|
||||
tracing::error!("DB connection failed: {e}");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user