type anotation error after upgrade of fastapi to latests, #203
              
                Unanswered
              
          
                  
                    
                      michelkluger
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| @michelkluger most likely you're annotating the the function  So the "fix" in this case would be annotate your function as  | 
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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
apollo/api.py:75: error: Argument 2 to "add_exception_handler" of "Starlette" has incompatible type "Callable[[Request, RateLimitExceeded], Response]"; expected "Callable[[Request, Exception], Response | Awaitable[Response]] | Callable[[WebSocket, Exception], Awaitable[None]]"
comes from line
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
how can I fix this?
starlette-0.37.2
fastapi-0.111.0
Beta Was this translation helpful? Give feedback.
All reactions