mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix: correct response status description in LoginRequestHandler and improve error logging in ServeDebugAppRequestHandler
This commit is contained in:
parent
b1a575e4d2
commit
3b57860123
2 changed files with 10 additions and 10 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue