use axum::http::StatusCode; use serde::Serialize; #[derive(Serialize)] pub struct CommonResp { pub code: i64, } pub fn internal_error(err: E) -> (StatusCode, String) where E: std::error::Error, { (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()) }