diff --git a/CHANGES.md b/CHANGES.md index d9984224..87c021b1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ # Changes ## Unreleased - 2020-xx-xx +### Fixed +* added the actual parsing error to `test::read_body_json` [#1812] + +[#1812]: https://github.com/actix/actix-web/pull/1812 + ## 3.3.2 - 2020-12-01 diff --git a/src/test.rs b/src/test.rs index ee51b71e..cff6c3e5 100644 --- a/src/test.rs +++ b/src/test.rs @@ -269,8 +269,9 @@ where { let body = read_body(res).await; - serde_json::from_slice(&body) - .unwrap_or_else(|_| panic!("read_response_json failed during deserialization")) + serde_json::from_slice(&body).unwrap_or_else(|e| { + panic!("read_response_json failed during deserialization: {}", e) + }) } pub async fn load_stream(mut stream: S) -> Result