Open simouel opened 2 years ago
Hi,
Is it possible to catch the "Scope not matched" and display a more accurate message to the user.
`app.include_router( manager.router, prefix="/manager", dependencies=[Depends(auth.scope('cognitogroup1))], ) ... @router.get("/units") def list_units( current_user: AccessUser = Depends(auth.scope(['cognitogroup1'])) ): ret = []; try: print(current_user) except: raise
return "OK"
`
Hi,
Is it possible to catch the "Scope not matched" and display a more accurate message to the user.
`app.include_router( manager.router, prefix="/manager", dependencies=[Depends(auth.scope('cognitogroup1))], ) ... @router.get("/units") def list_units( current_user: AccessUser = Depends(auth.scope(['cognitogroup1'])) ): ret = []; try: print(current_user) except: raise
`