Skip to content

Commit

Permalink
Add DB Exception page for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
maacpiash committed Sep 24, 2024
1 parent 479471d commit 9d8e6de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Amazon.SimpleEmail;
using Amazon.SimpleEmail;
using Amazon.S3;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
Expand Down Expand Up @@ -42,6 +42,8 @@
.AddSignInManager()
.AddDefaultTokenProviders();

builder.Services.AddDatabaseDeveloperPageExceptionFilter();

builder.Services.AddSingleton<IEmailSender<ApplicationUser>, AwsSesEmailSender>();

AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
Expand All @@ -51,6 +53,7 @@
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseMigrationsEndPoint();
}
else
Expand Down

0 comments on commit 9d8e6de

Please sign in to comment.