浏览代码

add logging

Luke Pulverenti 9 年之前
父节点
当前提交
17e416a0fd
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      MediaBrowser.Api/UserLibrary/ItemsService.cs

+ 5 - 0
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);