mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 07:45:18 -05:00
feat: Implement centralized error capture and handling with new middleware, services, and API endpoints, and add new admin and statistics API views.
This commit is contained in:
@@ -12,6 +12,8 @@ from django.contrib.auth import get_user_model
|
||||
from django.db import transaction
|
||||
from django.utils import timezone
|
||||
|
||||
from apps.core.utils import capture_and_log
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
User = get_user_model()
|
||||
|
||||
@@ -59,12 +61,10 @@ def check_overdue_closings() -> dict:
|
||||
failed += 1
|
||||
error_msg = f"Ride {ride.id} ({ride.name}): {str(e)}"
|
||||
failures.append(error_msg)
|
||||
logger.error(
|
||||
"Failed to transition ride %s (%s): %s",
|
||||
ride.id,
|
||||
ride.name,
|
||||
str(e),
|
||||
exc_info=True,
|
||||
capture_and_log(
|
||||
e,
|
||||
f'Transition closing ride {ride.id} ({ride.name})',
|
||||
source='task',
|
||||
)
|
||||
|
||||
result = {
|
||||
|
||||
Reference in New Issue
Block a user