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:
pacnpal
2026-01-02 15:55:42 -05:00
parent 1adba1b804
commit 95700c7d7b
43 changed files with 2477 additions and 158 deletions

View File

@@ -21,6 +21,7 @@ from apps.rides.models import (
RideRanking,
RideReview,
)
from apps.core.utils import capture_and_log
logger = logging.getLogger(__name__)
@@ -96,7 +97,7 @@ class RideRankingService:
}
except Exception as e:
self.logger.error(f"Error updating rankings: {e}", exc_info=True)
capture_and_log(e, 'Update ride rankings', source='service')
raise
def _get_eligible_rides(self, category: str | None = None) -> list[Ride]: