Skip to content

feat: add global exception filter, CORS_ORIGINS validation, and Swagger - #367

Merged
EmmanuelOchaje merged 2 commits into
StellarTickets:mainfrom
Chidubemkingsley:feat/error-handling-cors-swagger
Sep 26, 2026
Merged

EmmanuelOchaje merged 2 commits into
StellarTickets:mainfrom
Chidubemkingsley:feat/error-handling-cors-swagger

Conversation

@Chidubemkingsley

Copy link
Copy Markdown
Contributor

Summary

Testing

  • npx tsc --noEmit passes
  • npx eslint "src/**/*.ts" passes
  • npm test passes
  • npm run build succeeds

- Add GlobalExceptionFilter mapping Prisma errors (P2002, P2025) and unknown errors to HTTP responses
- Add CORS_ORIGINS env variable with comma-separated origins parsing and validation
- Reject wildcard (*) in CORS_ORIGINS for production environment
- Add @nestjs/swagger with /docs endpoint in non-production environments
- Add ApiPropertyOptional to PaginationQueryDto for OpenAPI documentation
- Add tests for global exception filter and CORS validation
- Lint/formatting fixes across codebase
@netlify

netlify Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for stellarticketsbackend failed.

Name Link
🔨 Latest commit 1c486dd
🔍 Latest deploy log https://app.netlify.com/projects/stellarticketsbackend/deploys/6ab7d1c980c17b0008436f35

@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@Chidubemkingsley Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants