Skip to content

Commit 40d0b57

Browse files
committed
Removed explicit configuration of UseDeveloperExceptionPage()
This is enabled by default with ASP.NET Core 6's new minimal hosting model.
1 parent 5140a7e commit 40d0b57

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

OnTopic.AspNetCore.Mvc.Host/Program.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@
4848
/*------------------------------------------------------------------------------------------------------------------------------
4949
| Configure: Error Pages
5050
\-----------------------------------------------------------------------------------------------------------------------------*/
51-
if (app.Environment.IsDevelopment()) {
52-
app.UseDeveloperExceptionPage();
53-
}
54-
else {
51+
if (!app.Environment.IsDevelopment()) {
5552
app.UseStatusCodePagesWithReExecute("/Error/{0}");
5653
app.UseExceptionHandler("/Error/500/");
5754
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.

0 commit comments

Comments
 (0)