Error Log Service Layer Implementation and Audit Log Integration
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
Error logs currently lack integration with the audit log system, making it difficult to correlate errors with specific user actions. The error log handling is not structured through the service layer pattern, which is inconsistent with the codebase architecture.
- Error logs table does not have `request_id` column to link with audit logs
- Error log handling is not implemented in the service/repository layer pattern
- Audit log API does not return associated error information
## Objective
Implement Error Log through the service layer pattern and integrate with Audit Log via request_id for comprehensive error tracking.
- Add `request_id` column to error_logs table
- Implement ErrorLogRepository and ErrorLogService following existing patterns
- Extend Audit Log API to return associated error messages (without traceback)
## Expected Sub Issues
- Add request_id Column to Error Log Table (Alembic Migration)
- Implement Error Log Repository Layer
- Implement Error Log Service Layer
- Extend Audit Log API to Return Associated Error Messages
JIRA Issue: BA-3718
Contributor guide
Assessment
This issue has not been assessed yet.