From 954fe21751991ea6e60e0f6b30c64864a837c0cc Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 3 Apr 2019 19:07:25 -0700 Subject: [PATCH] set response error body --- actix-http/src/response.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actix-http/src/response.rs b/actix-http/src/response.rs index 88eb7dcc..f8294552 100644 --- a/actix-http/src/response.rs +++ b/actix-http/src/response.rs @@ -54,7 +54,8 @@ impl Response { /// Constructs an error response #[inline] pub fn from_error(error: Error) -> Response { - let mut resp = error.as_response_error().error_response(); + let resp = error.as_response_error().error_response(); + let mut resp = resp.set_body(Body::from(format!("{}", error))); resp.error = Some(error); resp }