Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Fallible extractor filter #1053

Open
jakajancar opened this issue Jul 23, 2023 · 0 comments
Open

Feature request: Fallible extractor filter #1053

jakajancar opened this issue Jul 23, 2023 · 0 comments
Labels
feature New feature or request

Comments

@jakajancar
Copy link
Contributor

For example:

fn user(db: Db) -> impl Filter<Extract = (UserId,)> + Clone {
    // ...
}

It internally calls e.g. warp::header() but then connects to the database which might fail. If such a filter just rejects, other peer filters will still be attempted (perhaps attempting the same database query 10 times).

What is the best practice for filters like this?

@jakajancar jakajancar added the feature New feature or request label Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant