Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/src/commit/0f4bfd7afc4476d6855141b77bc9ed6f6352f34e/NzbDrone.Api/ErrorManagement/ErrorHandler.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Prowlarr/NzbDrone.Api/ErrorManagement/ErrorHandler.cs

35 lines
1.1 KiB

using Nancy;
using Nancy.ErrorHandling;
using NzbDrone.Api.Extensions;
namespace NzbDrone.Api.ErrorManagement
{
public class ErrorHandler : IStatusCodeHandler
{
public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
{
return true;
}
public void Handle(HttpStatusCode statusCode, NancyContext context)
{
if (statusCode == HttpStatusCode.SeeOther || statusCode == HttpStatusCode.OK)
return;
if (statusCode == HttpStatusCode.Continue)
{
context.Response = new Response { StatusCode = statusCode };
return;
}
if (statusCode == HttpStatusCode.Unauthorized)
return;
if (context.Response.ContentType == "text/html" || context.Response.ContentType == "text/plain")
context.Response = new ErrorModel
{
Message = statusCode.ToString()
}.AsResponse(statusCode);
}
}
}