Fix safe output handlers returning { success: false } incorrectly marked as successful and GraphQL query error in project status updates - #9666
Merged
Conversation
The safe_output_handler_manager now checks if handlers return { success: false }
and treats them as failures. Previously, only exceptions were caught as failures,
causing handlers that catch their own errors and return success:false to be
incorrectly marked as successful.
This fixes the issue where create_project_status_update would report success
even when encountering GraphQL errors.
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix project status update failure due to query error
Fix safe output handlers returning { success: false } incorrectly marked as successful
Jan 11, 2026
Collaborator
|
@copilot Also fix underlying issue for failing project status update. |
Removed redundant edges field from the GraphQL query which was causing API errors. The projectsV2 connection should use nodes field for simple queries without pagination cursors. This fixes the "Something went wrong while executing your query" error when falling back to list-based project resolution. Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Contributor
Author
Fixed in 0f54983. The underlying issue was that the GraphQL query in |
Copilot
AI
changed the title
Fix safe output handlers returning { success: false } incorrectly marked as successful
Fix safe output handlers returning { success: false } incorrectly marked as successful and GraphQL query error in project status updates
Jan 11, 2026
mnkiefer
marked this pull request as ready for review
January 11, 2026 21:41
mnkiefer
approved these changes
Jan 11, 2026
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.
Safe output handlers that catch exceptions and return
{ success: false, error: "..." }were incorrectly logged as successful. The handler manager only caught thrown exceptions, missing the explicit failure signal in the return value.Additionally, the GraphQL query for listing projects was causing API errors due to requesting redundant fields.
From workflow run #20901743240:
Changes
Handler manager (
safe_output_handler_manager.cjs)result.success === falseafter handler invocationProject status update handler (
create_project_status_update.cjs)listAccessibleProjectsV2GraphQL query to use onlynodesfield instead of bothnodesandedgesTest coverage (
safe_output_handler_manager.test.cjs){ success: false }are treated as failuresImpact
Handler Manager Fix: Affects all handlers using the error-catching pattern (~20+ handlers):
create_project_status_update,create_issue,add_comment,add_labels,add_reviewer,assign_milestone,close_issue,close_pull_request,create_code_scanning_alert,dispatch_workflow,hide_comment,link_sub_issue,update_issue,update_discussion,update_pull_request, and othersGraphQL Query Fix: Eliminates API errors when falling back to list-based project resolution, making project status updates more reliable
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.