Skip to content

The Free Software Media System - Server Backend & API

add logging

Luke Pulverenti17e416a0fd68
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 19cadbec71..a6f1d8b98f 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -108,6 +108,11 @@ namespace MediaBrowser.Api.UserLibrary
throw new InvalidOperationException("GetItemsToSerialize returned null");
}
+ if (result.Items == null)
+ {
+ throw new InvalidOperationException("GetItemsToSerialize result.Items returned null");
+ }
+
var dtoOptions = GetDtoOptions(request);
var dtoList = await _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user).ConfigureAwait(false);