Fix lint errors

This commit is contained in:
2026-02-20 04:59:56 +00:00
parent faa04a0d01
commit 595abd6cd3
19 changed files with 442 additions and 321 deletions

View File

@@ -1,3 +1,5 @@
"""Conversation router for detect-intent endpoints."""
import logging
from typing import Annotated
@@ -23,6 +25,7 @@ async def detect_intent(
Args:
request: External conversation request from client
conversation_manager: Conversation manager service instance
Returns:
Dialogflow detect intent response
@@ -32,12 +35,12 @@ async def detect_intent(
logger.info("Received detect-intent request")
response = await conversation_manager.manage_conversation(request)
logger.info("Successfully processed detect-intent request")
return response
except ValueError as e:
logger.error(f"Validation error: {e!s}", exc_info=True)
raise HTTPException(status_code=400, detail=str(e))
logger.exception("Validation error")
raise HTTPException(status_code=400, detail=str(e)) from e
except Exception as e:
logger.error(f"Error processing detect-intent: {e!s}", exc_info=True)
raise HTTPException(status_code=500, detail="Internal server error")
logger.exception("Error processing detect-intent")
raise HTTPException(status_code=500, detail="Internal server error") from e
else:
return response