You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's natural to see the Path extractor and think that you need one as an argument in your handler for each path component you want to capture. When I saw this, I knew exactly what the problem was, because I had exactly the same problem a few weeks ago.
While the documentation for Path does say that it extracts multiple components to tuples, it never says explicitly that you should not try to extract multiple components each with its own Path extractor like above. Saying this explicitly would head off a common confusion for new users.
The text was updated successfully, but these errors were encountered:
uckelman
added a commit
to uckelman/axum
that referenced
this issue
Nov 13, 2023
Bug Report
Version
Platform
Description
A few days ago on Discord somebody posted code like the following, wondering why it doesn't work:
It's natural to see the
Path
extractor and think that you need one as an argument in your handler for each path component you want to capture. When I saw this, I knew exactly what the problem was, because I had exactly the same problem a few weeks ago.While the documentation for
Path
does say that it extracts multiple components to tuples, it never says explicitly that you should not try to extract multiple components each with its ownPath
extractor like above. Saying this explicitly would head off a common confusion for new users.The text was updated successfully, but these errors were encountered: