diff --git a/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs b/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs
index 8845c372..22b3c6a0 100644
--- a/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs
+++ b/Iceshrimp.Backend/Core/Middleware/ErrorHandlerMiddleware.cs
@@ -97,9 +97,9 @@ public class ErrorHandlerMiddleware(
StatusCode = ctx.Response.StatusCode,
Error = verbosity >= ExceptionVerbosity.Basic ? ce.Error : ce.StatusCode.ToString(),
Message = verbosity >= ExceptionVerbosity.Basic ? ce.Message : null,
- Details = verbosity == ExceptionVerbosity.Full ? ce.Details : null,
- Errors = verbosity == ExceptionVerbosity.Full ? (ce as ValidationException)?.Errors : null,
- Source = verbosity == ExceptionVerbosity.Full ? type : null,
+ Details = verbosity >= ExceptionVerbosity.Full ? ce.Details : null,
+ Errors = verbosity >= ExceptionVerbosity.Full ? (ce as ValidationException)?.Errors : null,
+ Source = verbosity >= ExceptionVerbosity.Full ? type : null,
RequestId = ctx.TraceIdentifier
};
@@ -125,7 +125,7 @@ public class ErrorHandlerMiddleware(
StatusCode = 500,
Error = "Internal Server Error",
Message = verbosity >= ExceptionVerbosity.Basic ? e.Message : null,
- Source = verbosity == ExceptionVerbosity.Full ? type : null,
+ Source = verbosity >= ExceptionVerbosity.Full ? type : null,
RequestId = ctx.TraceIdentifier
};
@@ -294,5 +294,6 @@ public enum ExceptionVerbosity
[SuppressMessage("ReSharper", "UnusedMember.Global")]
None = 0,
Basic = 1,
- Full = 2
+ Full = 2,
+ Debug = 3,
}
\ No newline at end of file
diff --git a/Iceshrimp.Backend/Pages/Shared/ErrorPage.cshtml b/Iceshrimp.Backend/Pages/Shared/ErrorPage.cshtml
index fda8a1e5..8113c44b 100644
--- a/Iceshrimp.Backend/Pages/Shared/ErrorPage.cshtml
+++ b/Iceshrimp.Backend/Pages/Shared/ErrorPage.cshtml
@@ -5,6 +5,7 @@
@using Microsoft.Extensions.Options
@model ErrorPageModel
@inject IOptions
- @foreach (var error in errors)
- {
- @error.Key
-
- @foreach (var val in error.Value)
- {
-
- }
-
@Model.Error.RequestId
+
+@if (Security.Value.ExceptionVerbosity >= ExceptionVerbosity.Debug)
+{
+ @Model.Error.Exception.ToString()
+}
+