Files
helios-server-rs/src/util/req.rs
2024-07-09 17:06:20 +00:00

15 lines
268 B
Rust

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