fix: answer 404 from the notification endpoint when the notifications app is not enabled - #1023
Conversation
… app is not enabled Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
📝 WalkthroughWalkthroughThe notification controller now checks whether the Notifications app is enabled for anyone before sending a notification. If the app is disabled, it logs a warning and throws Priority: ⬇️ Low — Impact reflects low issue severity. Severity of issue fixed: Low Merge Risk: 🔵 Low · up to When Notifications is disabled, callers receive a 404 rather than a successful undeliverable request. The error text identifying the disabled app is not regression-tested, so it could change without detection. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (3 skipped: 3 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 090104fa-9dbf-4daa-9312-d9b48c1abd41
📒 Files selected for processing (5)
CHANGELOG.mdlib/Controller/NotificationsController.phpopenapi-full.jsonopenapi.jsontests/php/Controller/NotificationsControllerTest.php
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.
POST /api/v1/notificationreturned 200 with thenotificationsapp not enabled, while the core notification manager delivered to nobody: no row, no log line. That is the state of every instance built from the server git checkout, since the app ships only in release tarballs.Now it logs a warning and answers 404 naming the missing app. Unit test added, OpenAPI regenerated.
Verified on NC master: 404 with the app disabled, 200 and the row with it enabled.