Skip to content

Commit 19e2a84

Browse files
committed
fixed bug where exceptions returned 404
1 parent da9fb21 commit 19e2a84

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

VinePlus.Web/Pages/Errors/404.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Layout= "Shared/_Layout";
66
ViewData[Keys.Title] = "404 - Not Found";
77
ViewData[Keys.Headings] = "";
8-
ViewData[Keys.Highlight] = MainHighlight.Vine;
8+
ViewData[Keys.Highlight] = "";
99
}
1010

1111

VinePlus.Web/Pages/Errors/500.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
@{
55
Layout= "Shared/_Layout";
6-
ViewData[Keys.Title] = "404 - Not Found";
6+
ViewData[Keys.Title] = "500 - Internal Server Error";
77
ViewData[Keys.Headings] = "";
8-
ViewData[Keys.Highlight] = MainHighlight.Vine;
8+
ViewData[Keys.Highlight] = "";
99
}
1010

1111
<div class="error">

VinePlus.Web/Pages/Errors/General.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
@{
55
Layout= "Shared/_Layout";
6-
ViewData[Keys.Title] = "404 - Not Found";
6+
ViewData[Keys.Title] = "An error occurred";
77
ViewData[Keys.Headings] = "";
8-
ViewData[Keys.Highlight] = MainHighlight.Vine;
8+
ViewData[Keys.Highlight] = "";
99
}
1010

1111
<div class="error">

VinePlus.Web/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@
4545

4646
}
4747
if (app.Environment.IsProduction()) {
48-
// app.UseExceptionHandler("/error");
4948
// app.UseHttpsRedirection();
5049
}
51-
app.UseExceptionHandler("/error");
50+
app.UseExceptionHandler("/errors/500");
5251

5352
app.UseSwagger();
5453
app.UseSwaggerUI( c =>

0 commit comments

Comments
 (0)