Skip to content

[BE-46] Implement global exception filter and response interceptor #701

@yusuftomilola

Description

@yusuftomilola

Overview

Implement a custom exception filter and response interceptor to standardise all API response shapes inside backend/contrib/.

Location

All work must be inside backend/contrib/src/common/.

Acceptance Criteria

  • HttpExceptionFilter catches all HttpException instances and returns { statusCode, message, error, timestamp, path }
  • TransformInterceptor wraps all successful responses as { success: true, data: <payload>, timestamp }
  • Both applied globally in AppModule via APP_FILTER and APP_INTERCEPTOR
  • Existing endpoints continue to pass their responses through the interceptor
  • Swagger docs updated to reflect the wrapper shape on at least one controller

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions