diff --git a/handlers/admin_conversations.py b/handlers/admin_conversations.py index 9721e2c7cfa..78f650e375f 100644 --- a/handlers/admin_conversations.py +++ b/handlers/admin_conversations.py @@ -2001,8 +2001,8 @@ async def store_logo_value(update: Update, context: ContextTypes.DEFAULT_TYPE): if settings.store_logo_path and os.path.exists(settings.store_logo_path): try: os.remove(settings.store_logo_path) - except: - pass + except Exception as e: + print(f"Error deleting old logo {settings.store_logo_path}: {e}") settings.store_logo_path = file_path session.commit() diff --git a/handlers/admin_handlers.py b/handlers/admin_handlers.py index 61c409b3b0a..e87086b1afa 100644 --- a/handlers/admin_handlers.py +++ b/handlers/admin_handlers.py @@ -1259,8 +1259,8 @@ async def admin_confirm_payment_callback(update: Update, context: ContextTypes.D chat_id=user_telegram_id, text=f"āœ… Payment Confirmed!\n\nšŸ’° Amount: {format_price(amount)}\nšŸ’µ New Balance: {format_price(new_balance)}" ) - except: - pass + except Exception as e: + print(f"Error notifying user {user_telegram_id}: {e}") # Go back to payment confirmation menu await admin_confirm_order_menu(update, context) @@ -1308,8 +1308,8 @@ async def admin_cancel_payment_callback(update: Update, context: ContextTypes.DE chat_id=user_telegram_id, text=f"āŒ Payment Cancelled\n\nšŸ’° Amount: {format_price(amount)}\n\nYour payment was not confirmed. Please contact support if you believe this is an error." ) - except: - pass + except Exception as e: + print(f"Error notifying user {user_telegram_id}: {e}") # Go back to payment cancellation menu await admin_cancel_order_menu(update, context) @@ -1351,8 +1351,8 @@ async def admin_cancel_order_callback(update: Update, context: ContextTypes.DEFA chat_id=user.telegram_id, text=f"āŒ Order #{order.id} has been cancelled by admin.\nšŸ’° Refund: {format_price(order.total_amount)}" ) - except: - pass + except Exception as e: + print(f"Error notifying user {user.telegram_id}: {e}") # Refresh order details await admin_order_detail_callback(update, context)