diff --git a/src/BUTR.Site.NexusMods.Client/Services/HttpClient/AuthenticationAnd401DelegatingHandler.cs b/src/BUTR.Site.NexusMods.Client/Services/HttpClient/AuthenticationAnd401DelegatingHandler.cs index 5c328ef0..438318f3 100644 --- a/src/BUTR.Site.NexusMods.Client/Services/HttpClient/AuthenticationAnd401DelegatingHandler.cs +++ b/src/BUTR.Site.NexusMods.Client/Services/HttpClient/AuthenticationAnd401DelegatingHandler.cs @@ -23,7 +23,7 @@ protected override async Task SendAsync(HttpRequestMessage try { var response = await base.SendAsync(request, ct); - + if (response.StatusCode == HttpStatusCode.Unauthorized) { await _tokenContainer.SetTokenAsync(null, ct); @@ -35,24 +35,24 @@ protected override async Task SendAsync(HttpRequestMessage { await _notificationService.Error("Backend is down! Notify about the issue on GitHub https://github.com/BUTR/BUTR.Site.NexusMods", "Error!"); } - + return response; } catch (ApiException e) { // Cloudflare timeout - if ( e.StatusCode == (int)HttpStatusCode.Unauthorized) + if (e.StatusCode == (int) HttpStatusCode.Unauthorized) { await _tokenContainer.SetTokenAsync(null, ct); await _notificationService.Error("Authentication failure! Please log in again!", "Error!"); } - + // Cloudflare timeout if (e.StatusCode == 522) { await _notificationService.Error("Backend is down! Notify about the issue on GitHub https://github.com/BUTR/BUTR.Site.NexusMods", "Error!"); } - + throw; } } diff --git a/src/BUTR.Site.NexusMods.Server/Program.cs b/src/BUTR.Site.NexusMods.Server/Program.cs index ae3e81a7..f017b4d6 100644 --- a/src/BUTR.Site.NexusMods.Server/Program.cs +++ b/src/BUTR.Site.NexusMods.Server/Program.cs @@ -43,11 +43,11 @@ public static async Task Main(string[] args) .Enrich.FromLogContext() .WriteTo.Console() .CreateBootstrapLogger(); - + try { Log.Information("Starting web application"); - + Z.EntityFramework.Extensions.EntityFrameworkManager.PreBulkInsert = PreBulkOperation; Z.EntityFramework.Extensions.EntityFrameworkManager.PreBulkDelete = PreBulkOperation; Z.EntityFramework.Extensions.EntityFrameworkManager.PreBulkMerge = PreBulkOperation;