diff --git a/src/utils/handler.rs b/src/utils/handler.rs index 3852aad..903185d 100644 --- a/src/utils/handler.rs +++ b/src/utils/handler.rs @@ -1,7 +1,7 @@ -use actix_web::HttpResponse; +use actix_web::{http::StatusCode, HttpResponse}; use crate::core::response::{Diagnostic, ResponseBody}; pub async fn route_not_found() -> HttpResponse { - ResponseBody::<()>::new(Diagnostic::new("404", "Route not found"), None).into() + HttpResponse::build(StatusCode::NOT_FOUND).json(ResponseBody::<()>::new(Diagnostic::new("404", "Route not found"), None)) }