Skip to content

Commit ab71a69

Browse files
committed
Removed content response from NotFound condition
If any content is returned as part of a result—as opposed to just an HTTP header—then the `UseStatusCodePages()` won't intercept the request. This fixes that issue.
1 parent 7cfa5ca commit ab71a69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OnTopic.AspNetCore.Mvc/_filters/ValidateTopicAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public override void OnActionExecuting(ActionExecutingContext context) {
7575

7676
if (currentTopic is null) {
7777
if (!AllowNull) {
78-
context.Result = controller.NotFound("There is no topic associated with this path.");
78+
context.Result = controller.NotFound();
7979
}
8080
return;
8181
}

0 commit comments

Comments
 (0)