2023-02-11 18:35:37 +05:30
|
|
|
use crate::error::Error;
|
|
|
|
use ::http::StatusCode;
|
|
|
|
use axum::response::{IntoResponse, Response};
|
|
|
|
|
2023-03-02 04:49:10 +05:30
|
|
|
#[allow(clippy::diverging_sub_expression, clippy::items_after_statements)]
|
2023-02-11 18:35:37 +05:30
|
|
|
pub mod http;
|
|
|
|
|
|
|
|
impl IntoResponse for Error {
|
|
|
|
fn into_response(self) -> Response {
|
|
|
|
(StatusCode::INTERNAL_SERVER_ERROR, format!("{}", self.0)).into_response()
|
|
|
|
}
|
|
|
|
}
|