Skip to content

Commit

Permalink
Merge pull request #179 from BUTR/code-formatting/fix-codeformatting
Browse files Browse the repository at this point in the history
Automated PR to fix formatting errors
  • Loading branch information
Aragas authored Mar 4, 2024
2 parents 3a0a96f + fd88e82 commit 8220e01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
try
{
var response = await base.SendAsync(request, ct);

if (response.StatusCode == HttpStatusCode.Unauthorized)
{
await _tokenContainer.SetTokenAsync(null, ct);
Expand All @@ -35,24 +35,24 @@ protected override async Task<HttpResponseMessage> 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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.Site.NexusMods.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8220e01

Please sign in to comment.