Skip to content

Conversation

seunghkong
Copy link

fix to the following type hint error:

Argument of type "(request: Request, exc: RateLimitExceeded) -> Response" cannot be assigned to parameter "handler" of type "ExceptionHandler" in function "add_exception_handler" Type "(request: Request, exc: RateLimitExceeded) -> Response" is not assignable to type "ExceptionHandler" Type "(request: Request, exc: RateLimitExceeded) -> Response" is not assignable to type "HTTPExceptionHandler" Parameter 2: type "Exception" is incompatible with type "RateLimitExceeded" "Exception" is not assignable to "RateLimitExceeded" 

practically the same code as

app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
fix to the following type hint error: Parameter 2: type "Exception" is incompatible with type "RateLimitExceeded" "Exception" is not assignable to "RateLimitExceeded"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant