The Free Software Media System - Server Backend & API
Remove duplicate code
David37a4cc599ba5
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.csindex 9e8c3eb9be..b1a5c6dc5e 100644--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -230,13 +230,9 @@ namespace Emby.Server.Implementations.HttpServerhttpRes.StatusCode = statusCode;- if (!_hostEnvironment.IsDevelopment())- {- await httpRes.WriteAsync("Error processing request.").ConfigureAwait(false);- return;- }-- var errContent = NormalizeExceptionMessage(ex) ?? string.Empty;+ var errContent = _hostEnvironment.IsDevelopment()+ ? (NormalizeExceptionMessage(ex) ?? string.Empty)+ : "Error processing request.";httpRes.ContentType = "text/plain";httpRes.ContentLength = errContent.Length;await httpRes.WriteAsync(errContent).ConfigureAwait(false);