diff options
| author | Max Git <rotvel@gmail.com> | 2020-06-11 14:50:29 +0200 |
|---|---|---|
| committer | Max Git <rotvel@gmail.com> | 2020-06-11 14:50:29 +0200 |
| commit | 620a1a106d6ecb824c1b52703013cd87413b0297 (patch) | |
| tree | 64e6e5616fe045aa837a8b3c6c1c3d5c33035e7e /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 268e87bbf27a724edd9ea665619563729998aba9 (diff) | |
| parent | 55610f83597e668854e6022cd9d3a60d14cb0623 (diff) | |
Merge branch 'master' into feature/ffmpeg-version-check
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 7de4f168c..b1a5c6dc5 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -230,7 +230,9 @@ namespace Emby.Server.Implementations.HttpServer httpRes.StatusCode = statusCode; - 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); |
