Replies: 2 comments 4 replies
-
|
I think that's expected behavior! starlette doesn't handle exceptions in route matching, so raising inside |
Beta Was this translation helpful? Give feedback.
-
|
Raising from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello and thanks for this great project.
I'm using a Starlette Convertor according to the docs, which looks something like this:
I want to allow some values but deny others, and I cannot reflect that in the regex (as it might depend on some dynamic logic)
When an invalid value is passed in this parameter, the server returns 500 and I get this trace:
Is it possible to return a 4xx somehow, if the call to
convert()fails because the value is invalid?Or handle this kind of issue gracefully in another way?
Python 3.14
Starlette 1.0.0
Beta Was this translation helpful? Give feedback.
All reactions