mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
remove Path and Query from public api
This commit is contained in:
@ -5,7 +5,7 @@ and [`ResponseError` trait](../actix_web/error/trait.ResponseError.html)
|
||||
for handling handler's errors.
|
||||
Any error that implements `ResponseError` trait can be returned as error value.
|
||||
*Handler* can return *Result* object, actix by default provides
|
||||
`Responder` implementation for compatible result object. Here is implementation
|
||||
`Responder` implementation for compatible result types. Here is implementation
|
||||
definition:
|
||||
|
||||
```rust,ignore
|
||||
@ -64,7 +64,7 @@ fn index(req: HttpRequest) -> Result<&'static str, MyError> {
|
||||
# }
|
||||
```
|
||||
|
||||
In this example *index* handler will always return *500* response. But it is easy
|
||||
In this example *index* handler always returns *500* response. But it is easy
|
||||
to return different responses for different type of errors.
|
||||
|
||||
```rust
|
||||
@ -109,7 +109,7 @@ fn index(req: HttpRequest) -> Result<&'static str, MyError> {
|
||||
## Error helpers
|
||||
|
||||
Actix provides set of error helper types. It is possible to use them to generate
|
||||
specific error responses. We can use helper types for first example with custom error.
|
||||
specific error responses. We can use helper types for the first example with custom error.
|
||||
|
||||
```rust
|
||||
# extern crate actix_web;
|
||||
|
Reference in New Issue
Block a user