Skip to content

Handle unexpected value in request #1757

Discussion options

You must be logged in to vote

Use a Result<u8, &str> instead of the bare u8. It will be an Err(&str) with the original parameter if and when it failed
to parse as a u8. All of this is discussed in detail in the API docs for FromParam.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sagarnayak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants