1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-12 02:09:36 +00:00

Add Migration steps for Custom Error (#869)

Adds migration steps for custom error in 1.0
This commit is contained in:
octave99 2019-05-29 16:47:04 +00:00 committed by Nikolay Kim
parent a614be7cb5
commit fe781345d5

View file

@ -238,6 +238,17 @@
* 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