Return ProblemDetails with error detail on every failure arm and compose ProblemDetails customization#326
Merged
Conversation
… compose ProblemDetails customization
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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
public paths (typed IResult via ToIResult/CustomResults.Problem, and MVC via ToActionResult) — NotFound
and Conflict no longer return bare, detail-less responses.
arm, on both paths.
consumer-supplied CustomizeProblemDetails via PostConfigure, instead of one silently overwriting the other.
instead of discarding it on net10 with nullable Content) and attaches a ProblemDetails schema to the
problem+json media type, on both net9 and net10.
creating a logger on every access.
at resolution); MapEndpoints resolves endpoints from a dedicated scope instead of the root provider.
Observable HTTP payload changes
existing 500 response's Description is preserved when merged instead of being replaced.
Verification
the CustomizeProblemDetails composition test, transformer merge/schema on both net9.0/net10.0, and
endpoint-registration hardening. All 31 pass on the fix; 21 of 31 fail against unfixed main (verified by
stashing the src changes and re-running), confirming each is load-bearing.
docs/articles/result-pattern.md's mapping table still says Problem → 500 and needs updating to 400.
Backport to v1.0: no — observable HTTP payload changes are minor-appropriate; ships in 1.1.0.