Move DefaultErrorHandlingMode to request options and add AllowErrorHandlingModeOverride#9634
Merged
tobias-tengler merged 2 commits intomainfrom May 2, 2026
Merged
Conversation
…ndlingModeOverride
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates null-propagation error handling defaults from schema/gateway options into request-level executor options, and introduces an explicit AllowErrorHandlingModeOverride switch to control whether per-request onError values are honored. It updates both Core and Fusion execution paths, plus related tests and migration guidance.
Changes:
- Move
DefaultErrorHandlingModefrom schema/Fusion core options intoRequestExecutorOptionsandFusionRequestOptions. - Gate per-request
onErroroverrides behind the newAllowErrorHandlingModeOverridesetting in Core and Fusion execution. - Update tests, snapshots, and migration docs to reflect the new configuration surface.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md |
Updates migration guidance to configure the default mode via request options. |
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs |
Adjusts Fusion integration test setup to use request options for default error handling. |
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestOptions.cs |
Adds Fusion request-level default error handling settings and clone support. |
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionOptions.cs |
Removes default error handling from Fusion schema-level options. |
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Extensions/FusionRequestContextExtensions.cs |
Switches Fusion runtime fallback logic to request options. |
src/HotChocolate/Core/test/Execution.Tests/Errors/__snapshots__/NullErrorPropagationTests.PerRequestOverride_IsIgnored_When_AllowErrorHandlingModeOverride_IsDisabled.json |
Adds expected Core snapshot for disabled per-request override behavior. |
src/HotChocolate/Core/test/Execution.Tests/Errors/__snapshots__/NullErrorPropagationTests.DefaultErrorHandlingMode_AppliesFromRequestExecutorOptions.json |
Adds expected Core snapshot for request-executor default mode behavior. |
src/HotChocolate/Core/test/Execution.Tests/Errors/NullErrorPropagationTests.cs |
Renames and extends Core tests for request-executor defaults and override gating. |
src/HotChocolate/Core/src/Types/SchemaOptions.cs |
Removes schema-level storage/copying of DefaultErrorHandlingMode. |
src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs |
Removes the schema-options API surface for default error handling mode. |
src/HotChocolate/Core/src/Types/Execution/Processing/OperationContext.Pooling.cs |
Reads null-propagation behavior from executor request options during operation initialization. |
src/HotChocolate/Core/src/Types/Execution/Options/RequestExecutorOptions.cs |
Adds request-executor-level default mode and override toggle. |
src/HotChocolate/Core/src/Types/Execution/Options/IErrorHandlerOptionsAccessor.cs |
Exposes the new error handling settings through the options accessor interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.