Better exception message when folders or folder items are missing (#13632)

Emit the not-found Id in the exception for easier diagnosis
This commit is contained in:
Marc Brooks 2025-03-01 00:01:21 -06:00 committed by GitHub
parent 93dd5551df
commit f035b11625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,7 +204,7 @@ namespace Emby.Server.Implementations.Collections
{
if (_libraryManager.GetItemById(collectionId) is not BoxSet collection)
{
throw new ArgumentException("No collection exists with the supplied Id");
throw new ArgumentException("No collection exists with the supplied collectionId " + collectionId);
}
List<BaseItem>? itemList = null;
@ -218,7 +218,7 @@ namespace Emby.Server.Implementations.Collections
if (item is null)
{
throw new ArgumentException("No item exists with the supplied Id");
throw new ArgumentException("No item exists with the supplied Id " + id);
}
if (!currentLinkedChildrenIds.Contains(id))