|
|
@ -230,13 +230,9 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
|
|
|
|
|
|
|
httpRes.StatusCode = statusCode;
|
|
|
|
httpRes.StatusCode = statusCode;
|
|
|
|
|
|
|
|
|
|
|
|
if (!_hostEnvironment.IsDevelopment())
|
|
|
|
var errContent = _hostEnvironment.IsDevelopment()
|
|
|
|
{
|
|
|
|
? (NormalizeExceptionMessage(ex) ?? string.Empty)
|
|
|
|
await httpRes.WriteAsync("Error processing request.").ConfigureAwait(false);
|
|
|
|
: "Error processing request.";
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var errContent = NormalizeExceptionMessage(ex) ?? string.Empty;
|
|
|
|
|
|
|
|
httpRes.ContentType = "text/plain";
|
|
|
|
httpRes.ContentType = "text/plain";
|
|
|
|
httpRes.ContentLength = errContent.Length;
|
|
|
|
httpRes.ContentLength = errContent.Length;
|
|
|
|
await httpRes.WriteAsync(errContent).ConfigureAwait(false);
|
|
|
|
await httpRes.WriteAsync(errContent).ConfigureAwait(false);
|
|
|
|