refactor: use centralized error handling in branch protection controller - #747
refactor: use centralized error handling in branch protection controller#747vaaibhavkaushik wants to merge 2 commits into
Conversation
|
@vaaibhavkaushik, please wait until an issue has been assigned to you before opening a PR. Pull requests for unassigned issues will not be considered for review. Thank you for your understanding and cooperation! 🙌🏻 |
Thank you for the clarification, @Ankita15k. I understand and apologize for opening the PR before the issue was assigned. I had already completed the implementation and wanted to contribute, but I'll make sure to wait for an official assignment before opening any future PRs. If possible, I would be grateful if you could kindly review this PR once, as the changes are already implemented and follow the project's existing patterns. If it cannot be considered due to the repository policy, I completely understand and will follow the assignment process for all future contributions. Thank you for your time and guidance! 🙏 |
Summary
Refactors the Branch Protection controller to use GitNest's existing centralized error-handling pipeline.
Changes
500responses withnext(error).AppErrorwith status404.AppErrorwith status403.422errors.Validation
node --check backend/src/controllers/branchProtection.controller.jsgit diff --checkThe full repository test suite currently contains unrelated pre-existing failures involving missing validators, broken exports, rate-limit tests, and other modules outside this PR's scope.
Closes #746
Contributing under GSSoC'26.