Replies: 1 comment
-
I think you should be able to do this with a request guard? If you don't need access to the request body, you can check whatever you'd like from the query string and provide the corresponding errors. Not a full snippet, but your
Or what have you. That'd give you control over the specific status for each condition. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's use the oauth2 authorize endpoint for example:
I want to have validation and "feedback" from those query parameters, e.g. if the
client_id
field is not given I want to return a bad request (400) with a message "client_id is required". Same withredirect_uri
.Another use case would be for
code_challenge_method
, e.g. If the value is not equal toS256
I would like to return a bad request (400) stating "code_challenge_method must be S256".I cannot find a way using forms to get the desired effect, because if the form fails validation, it fails to match the route and returns 404. Does this mean I have to pass in everything as
Option<_>
and handle all the validation manually?Beta Was this translation helpful? Give feedback.
All reactions