From 6fa8950cf867a8e1246c2f2c90a4047ae5175f6f Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 30 Oct 2019 14:36:53 -0400 Subject: Replace Json handler with handler for status codes --- src/routes/not_understood.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/routes/not_understood.rs') diff --git a/src/routes/not_understood.rs b/src/routes/not_understood.rs index c94e6e2..4e30361 100644 --- a/src/routes/not_understood.rs +++ b/src/routes/not_understood.rs @@ -6,7 +6,10 @@ pub fn not_understood(req: HttpRequest) -> JsonMessage { path: destruct_path(req.path()), }; - Ok(Json(message.as_outgoing())) + Ok(FormatMsg { + message: message.as_outgoing(), + code: StatusCode::NOT_FOUND, + }) } #[cfg(test)] -- cgit