You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple service methods call auditLog() without await, meaning audit log failures are silently swallowed and don't block the main operation. While this is intentional for non-blocking behavior, it means audit logs can be lost without any indication.
Bug Description
Multiple service methods call
auditLog()withoutawait, meaning audit log failures are silently swallowed and don't block the main operation. While this is intentional for non-blocking behavior, it means audit logs can be lost without any indication.Locations
Examples across the codebase:
src/modules/courses/course.service.ts- multiple callssrc/modules/quizzes/quiz.service.ts- multiple callssrc/modules/rewards/reward.service.ts- multiple callssrc/modules/admin/admin-users.service.ts- multiple callsThe Problem
While making audit logging non-blocking is correct (audit failures shouldn't fail the main operation), the current implementation:
Recommended Fix
Either:
auditLogfunction itself to log failures.catch()to log the failure:Acceptance Criteria
Severity
low - Observability improvement. Audit logs are important for compliance but losing them shouldn't break the system.