Skip to content

Can't use Option for Query extractor? #3334

Answered by mladedav
sidoki asked this question in Q&A
Discussion options

You must be logged in to vote

You can do Query<Option<QueryParams>> (which will accept either no query or well formed query but would reject anything that doesn't deserialize depending on your expected query) or you can do Result<Query<QueryParams>, QueryRejection> which works the same as the old Option, you just need to be more explicit.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jplatte
Comment options

@sidoki
Comment options

Answer selected by sidoki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants