Fix dismiss_notification rejecting valid HTTP 204 response#1822
Merged
SamMorrowDrums merged 2 commits intomainfrom Jan 16, 2026
Merged
Fix dismiss_notification rejecting valid HTTP 204 response#1822SamMorrowDrums merged 2 commits intomainfrom
SamMorrowDrums merged 2 commits intomainfrom
Conversation
- Add http.StatusNoContent (204) to the list of accepted success status codes - Add test case for 204 response when marking notification as done - Retain existing test for 200 response for backwards compatibility Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix dismiss_notification tool reporting failure on 204 response
Fix dismiss_notification rejecting valid HTTP 204 response
Jan 16, 2026
JoannaaKL
approved these changes
Jan 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the dismiss_notification tool where HTTP 204 (No Content) responses from GitHub's API were incorrectly treated as failures. The GitHub API returns 204 as the documented success status when marking notifications as done, so this change aligns the code with the actual API contract.
Changes:
- Added
http.StatusNoContent(204) to the accepted success status codes in theDismissNotificationhandler - Added test case for 204 response when marking notifications as done
- Renamed existing test case to clarify it tests 200 response scenario
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/github/notifications.go | Added HTTP 204 status code to success condition check for dismiss notification operation |
| pkg/github/notifications_test.go | Added test case for 204 response and clarified existing test naming to distinguish 200 vs 204 scenarios |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
dismiss_notificationtool incorrectly rejected HTTP 204 (No Content) responses from the GitHub API as failures, despite 204 being the documented success status for marking notifications as done.Why
When users marked notifications as done, the operation succeeded but reported:
failed to mark notification as done: unexpected status 204:What changed
http.StatusNoContent(204) to accepted success status codes inDismissNotificationhandlerMCP impact
Prompts tested (tool changes only)
N/A — No user-facing tool changes
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs
Original prompt
dismiss_notificationreports failure on successful 204 response #1817✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.