Skip to content

Conversation

sandhose
Copy link
Member

Looks like Query<Option<T>> is not really a valid extractor, which made Axum show a 500 error on the account page

Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92d1fec
Status: ✅  Deploy successful!
Preview URL: https://9e819246.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-fix-missing-query-p.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose requested a review from reivilibre January 29, 2025 15:46
@sandhose sandhose added the T-Defect Something isn't working label Jan 29, 2025
@reivilibre
Copy link
Contributor

maybe Option<Query<T>> would work, but this way is more extensible anyway

@sandhose
Copy link
Member Author

maybe Option<Query> would work, but this way is more extensible anyway

That changed in axum 0.8: the extractor has to implement OptionalFromRequestParts for that. This is because Option would void most errors that you'd actually want to handle

@sandhose sandhose merged commit 226684f into main Jan 30, 2025
21 checks passed
@sandhose sandhose deleted the quenting/fix-missing-query-params branch January 30, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants