Refactor OAuth provider linking and unlinking logic into a dedicated service; enhance error handling and logging throughout the application; improve sound management and scanning services with better file handling and unique naming; implement centralized error and logging services for consistent API responses and application-wide logging configuration.
This commit is contained in:
@@ -188,10 +188,12 @@ def require_credits(credits_needed: int):
|
||||
# Emit credits changed event via SocketIO
|
||||
try:
|
||||
from app.services.socketio_service import socketio_service
|
||||
|
||||
socketio_service.emit_credits_changed(user.id, user.credits)
|
||||
except Exception as e:
|
||||
# Don't fail the request if SocketIO emission fails
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.warning(f"Failed to emit credits_changed event: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user