mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 09:12:57 +01:00
Add Migration steps for Custom Error (#869)
Adds migration steps for custom error in 1.0
This commit is contained in:
parent
a614be7cb5
commit
fe781345d5
11
MIGRATION.md
11
MIGRATION.md
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user