fix: correct response status description in LoginRequestHandler and improve error logging in ServeDebugAppRequestHandler

This commit is contained in:
Neil Dorin 2026-05-04 09:43:06 -06:00
parent b1a575e4d2
commit 3b57860123
2 changed files with 10 additions and 10 deletions

View file

@ -71,7 +71,6 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
{
context.Response.StatusCode = 401;
context.Response.StatusDescription = "Bad Request";
context.Response.StatusDescription = "Unauthorized";
context.Response.ContentType = "application/json";
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
context.Response.Write(JsonConvert.SerializeObject(new { Error = "Unauthorized" }, Formatting.Indented), false);
@ -80,8 +79,8 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
}
if (!token.Valid)
{
context.Response.StatusCode = 401;
{
context.Response.StatusCode = 401;
context.Response.StatusDescription = "Unauthorized";
context.Response.End();