use axum::http::{Method, Uri};
use crate::error::HttpError;
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn not_found(request_uri: Uri, method: Method) -> HttpError {
HttpError::NotFound {
method: method.to_string(),
path: request_uri.path().to_owned(),
}
}
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn conversion_method_not_allowed() -> HttpError {
HttpError::MethodNotAllowed {
allowed: "POST, OPTIONS",
}
}
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn health_method_not_allowed() -> HttpError {
HttpError::MethodNotAllowed {
allowed: "GET, HEAD, OPTIONS",
}
}