Skip to content

Add proper error handling middleware instead of try/catch in every service method #901

Description

@nanaf6203-bit

Problem

Every service method wraps logic in try/catch blocks with ~500 lines of repetitive error handling, inconsistent messages, and missing stack traces.

Expected Outcome

Global exception filter handling all errors consistently.

Acceptance Criteria

  • Create global HttpExceptionFilter
  • Create PrismaExceptionFilter for database errors
  • Remove redundant try/catch from service methods
  • Consistent error response JSON structure

Files Affected

New: src/common/filters/, all service files

Difficulty

Medium

Estimated Effort

Medium (1 week)

Labels

refactoring, error-handling, enhancement

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions