Stats Page Overhaul (#4292)

Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
Joe Milazzo
2025-12-19 13:23:55 -07:00
committed by GitHub
parent 20197fa712
commit e1f421ccc0
175 changed files with 12122 additions and 5746 deletions
+6
View File
@@ -3,6 +3,7 @@ using System.Net;
using System.Text.Json;
using System.Threading.Tasks;
using API.Errors;
using Kavita.Common;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
@@ -21,6 +22,11 @@ public class ExceptionMiddleware(RequestDelegate next, ILogger<ExceptionMiddlewa
{
await next(context); // downstream middlewares or http call
}
catch (KavitaUnauthenticatedUserException)
{
context.Response.StatusCode = (int) HttpStatusCode.Unauthorized;
await context.Response.CompleteAsync();
}
catch (Exception ex)
{
logger.LogError(ex, "There was an exception");