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

Improve Path error when its extracted multiple times #1023

Merged
merged 6 commits into from May 11, 2022

Conversation

davidpdrsn
Copy link
Member

This makes the error returned when trying to extract multiple path params with async fn foo(Path<String>, Path<String>) and hints at using async fn foo(Path<(String, String)>) or a struct.

Fixes #1021

axum/src/extract/path/mod.rs Outdated Show resolved Hide resolved
axum/src/extract/path/mod.rs Show resolved Hide resolved
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
@davidpdrsn davidpdrsn merged commit 08cbade into main May 11, 2022
@davidpdrsn davidpdrsn deleted the improve-path-error branch May 11, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear how to resolve: Invalid URL: Wrong number of parameters. Expected 1 but got 2
2 participants