Skip to content

Commit 237b697

Browse files
davidnxmsftbot[bot]
authored andcommitted
Use StatusCodes.Status404NotFound instead of 404 (#18453)
This is a minor change to improve consistency and use `StatusCodes` members instead of raw harcoded status code numbers. It may help beginners browsing through the code-base to find where the default 404 response comes from for unmatched requests.
1 parent c848c33 commit 237b697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Http/src/Builder/ApplicationBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public RequestDelegate Build()
9696
throw new InvalidOperationException(message);
9797
}
9898

99-
context.Response.StatusCode = 404;
99+
context.Response.StatusCode = StatusCodes.Status404NotFound;
100100
return Task.CompletedTask;
101101
};
102102

0 commit comments

Comments
 (0)