-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Having an invalid client id with apitally middleware causes all fastapi requests to fail.
Reproduction
Using the following value will reproduce the issue:
APITALLY_CLIENT_ID="1234"
Issue
raise ValueError(f"invalid client_id '{client_id}' (expecting hexadecimal UUID format)")
ValueError: invalid client_id '1234' (expecting hexadecimal UUID format)Throws this exception here:
https://github.com/apitally/apitally-py/blob/main/apitally/client/client_base.py#49
which is unhandled by the middleware stack here:
https://github.com/apitally/apitally-py/blob/main/apitally/starlette.py#L86
Solution
An invalid client id should be logged as an error, but not cause a 500 error which prevents any requests from being processed.
Metadata
Metadata
Assignees
Labels
No labels