mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Remove duplicate code
Co-authored-by: Vasily <JustAMan@users.noreply.github.com>
This commit is contained in:
parent
e9ebe07ecc
commit
37a4cc599b
@ -230,13 +230,9 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
|
||||
httpRes.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);
|
||||
|
Loading…
Reference in New Issue
Block a user