Merge branch 'master' into fix-response-to-error-conversion

This commit is contained in:
Luca Palmieri 2021-05-03 16:22:19 +01:00 committed by GitHub
commit 892075b3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* `header` mod is now public. [#2171]
* `uri` mod is now public. [#2171]
* Update `language-tags` to `0.3`.
* Reduce the level from `error` to `debug` for the log line that is emitted when a `500 Internal Server Error` is built using `HttpResponse::from_error`. [#2196]
### Removed
* Stop re-exporting `http` crate's `HeaderMap` types in addition to ours. [#2171]
@ -18,6 +19,7 @@
* Converting an `HttpResponse` to an `Error` return the underlying `Error` if `HttpResponse` was built using `HttpResponse::from_error`.
[#2171]: https://github.com/actix/actix-web/pull/2171
[#2196]: https://github.com/actix/actix-web/pull/2196
## 3.0.0-beta.6 - 2021-04-17

View File

@ -78,7 +78,7 @@ impl Response<Body> {
pub fn from_error(error: Error) -> Response<Body> {
let mut resp = error.as_response_error().error_response();
if resp.head.status == StatusCode::INTERNAL_SERVER_ERROR {
error!("Internal Server Error: {:?}", error);
debug!("Internal Server Error: {:?}", error);
}
resp.error = Some(error);
resp