Fix lint errors

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

View File

@@ -1,3 +1,5 @@
"""Notification router for processing push notifications."""
import logging
from typing import Annotated
@@ -31,6 +33,7 @@ async def process_notification(
Args:
request: External notification request with text, phone, and parameters
notification_manager: Notification manager service instance
Returns:
None (204 No Content)
@@ -46,9 +49,9 @@ async def process_notification(
# Match Java behavior: process but don't return response body
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 notification: {e!s}", exc_info=True)
raise HTTPException(status_code=500, detail="Internal server error")
logger.exception("Error processing notification")
raise HTTPException(status_code=500, detail="Internal server error") from e