mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Remove duplicate code
Co-authored-by: Vasily <JustAMan@users.noreply.github.com>
This commit is contained in:
parent
a5a39300bc
commit
6d9f564a94
@ -93,13 +93,9 @@ namespace Jellyfin.Server.Middleware
|
||||
context.Response.ContentType = MediaTypeNames.Text.Plain;
|
||||
|
||||
// Don't send exception unless the server is in a Development environment
|
||||
if (!_hostEnvironment.IsDevelopment())
|
||||
{
|
||||
await context.Response.WriteAsync("Error processing request.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
var errorContent = NormalizeExceptionMessage(ex.Message);
|
||||
var errorContent = _hostEnvironment.IsDevelopment()
|
||||
? NormalizeExceptionMessage(ex.Message)
|
||||
: "Error processing request.";
|
||||
await context.Response.WriteAsync(errorContent).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user