From 4c029e54010eb5abc35ffd8a5897fc58f9a1f1e8 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 21 Jan 2022 14:10:30 +0100 Subject: [PATCH] :bug: Fix issue with not returning more than 1000 items --- packages/nodes-base/nodes/Spotify/GenericFunctions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts index e4f437275a..4de5c6c72d 100644 --- a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts @@ -66,7 +66,8 @@ export async function spotifyApiRequestAllItems(this: IHookFunctions | IExecuteF uri = responseData.next || responseData[propertyName.split('.')[0]].next; //remove the query as the query parameters are already included in the next, else api throws error. query = {}; - if (uri?.includes('offset=1000')) { + if (uri?.includes('offset=1000') && endpoint === '/search') { + // The search endpoint has a limit of 1000 so step before it returns a 404 return returnData; } } while (