|
|
@ -93,13 +93,9 @@ namespace Jellyfin.Server.Middleware
|
|
|
|
context.Response.ContentType = MediaTypeNames.Text.Plain;
|
|
|
|
context.Response.ContentType = MediaTypeNames.Text.Plain;
|
|
|
|
|
|
|
|
|
|
|
|
// Don't send exception unless the server is in a Development environment
|
|
|
|
// Don't send exception unless the server is in a Development environment
|
|
|
|
if (!_hostEnvironment.IsDevelopment())
|
|
|
|
var errorContent = _hostEnvironment.IsDevelopment()
|
|
|
|
{
|
|
|
|
? NormalizeExceptionMessage(ex.Message)
|
|
|
|
await context.Response.WriteAsync("Error processing request.").ConfigureAwait(false);
|
|
|
|
: "Error processing request.";
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var errorContent = NormalizeExceptionMessage(ex.Message);
|
|
|
|
|
|
|
|
await context.Response.WriteAsync(errorContent).ConfigureAwait(false);
|
|
|
|
await context.Response.WriteAsync(errorContent).ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|