async def startlette_exception_handler(request, exc): logging.exception(exc) return JSONResponse( Response(success=False, error_code=exc.status_code, message=str(exc.detail)).dict())
async def mongoengine_operation_exception_handler(request, exc): logging.exception(exc) return JSONResponse( Response(success=False, error_code=422, message=str(exc)).dict())
async def app_does_not_exist_exception_handler(request, exc): logging.exception(exc) return JSONResponse( Response(success=False, error_code=422, message=str(exc)).dict())
async def get_intents(current_user: User = Depends(auth.get_current_user)): """ This function returns the list of existing intents of the bot """ return Response( data=mongo_processor.get_intents(current_user.get_bot())).dict()