Add Migration steps for Custom Error

Adds migration steps for custom error in 1.0
This commit is contained in:
octave99 2019-05-28 06:33:02 +00:00 committed by GitHub
parent 1eb89b8375
commit b44cf1c090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -238,6 +238,17 @@
* Actors support have been moved to `actix-web-actors` crate * Actors support have been moved to `actix-web-actors` crate
* Custom Error
Instead of error_response method alone, ResponseError now provides two methods: error_response and render_response respectively. Where, error_response creates the error response and render_response returns the error response to the caller.
Simplest migration from 0.7 to 1.0 shall include below method to the custom implementation of ResponseError:
```rust
fn render_response(&self) -> HttpResponse {
self.error_response()
}
```
## 0.7.15 ## 0.7.15