Skip to content

Add ErrorModes to HotChocolate#9470

Merged
michaelstaib merged 4 commits intomainfrom
mst/error-mode-hc
Mar 28, 2026
Merged

Add ErrorModes to HotChocolate#9470
michaelstaib merged 4 commits intomainfrom
mst/error-mode-hc

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

No description provided.

var requestBuilder = OperationRequestBuilder.New()
.SetDocument(endpointDescriptor.Document)
.SetErrorHandlingMode(ErrorHandlingMode.Halt)
.SetErrorHandlingMode(ErrorHandlingMode.Propagate)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobias-tengler I have removed the halt mode as there are serious issues with it in combination with incremental delivery.

This has a downstream effect to this as we now get the old behavior as default.

I am not yet sure what we should use, we could also use the new error mode here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhmm. The intention was that there is no unnecessary work done if there's a single error the entire request will be returned as empty with HTTP 500 in that case anyway...

@michaelstaib michaelstaib merged commit 9649e3d into main Mar 28, 2026
3 checks passed
@michaelstaib michaelstaib deleted the mst/error-mode-hc branch March 28, 2026 04:29
}

[Fact]
public async Task Execution_Is_Halted_While_Subscription_Is_Still_Ongoing()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be re-added

}

[Fact]
public async Task Execution_Is_Halted_While_Http_Request_In_Node_Is_Still_Ongoing()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be re-added

var requestBuilder = OperationRequestBuilder.New()
.SetDocument(endpointDescriptor.Document)
.SetErrorHandlingMode(ErrorHandlingMode.Halt)
.SetErrorHandlingMode(ErrorHandlingMode.Propagate)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhmm. The intention was that there is no unnecessary work done if there's a single error the entire request will be returned as empty with HTTP 500 in that case anyway...

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants