diff --git a/src/components/playlisteditor/playlisteditor.ts b/src/components/playlisteditor/playlisteditor.ts index 5d15a39095..46100472c2 100644 --- a/src/components/playlisteditor/playlisteditor.ts +++ b/src/components/playlisteditor/playlisteditor.ts @@ -170,8 +170,9 @@ function populatePlaylists(editorOptions: PlaylistEditorOptions, panel: DialogEl ...playlist, permissions })) - .catch((err) => { - console.warn('[PlaylistEditor] Failed to fetch playlist permissions', err); + .catch(err => { + // If a user doesn't have access, then the request will 404 and throw + console.info('[PlaylistEditor] Failed to fetch playlist permissions', err); return playlist; }); @@ -231,7 +232,7 @@ function getEditorHtml(items: string[]) { html += `
diff --git a/src/components/shortcuts.js b/src/components/shortcuts.js index 099bed83c7..91f96f9d9b 100644 --- a/src/components/shortcuts.js +++ b/src/components/shortcuts.js @@ -128,8 +128,9 @@ function showContextMenu(card, options = {}) { userId: apiClient.getCurrentUserId() }) .then(({ data }) => data) - .catch(() => { + .catch(err => { // If a user doesn't have access, then the request will 404 and throw + console.info('[Shortcuts] Failed to fetch playlist permissions', err); return { CanEdit: false }; }) : // Not a playlist item diff --git a/src/scripts/playlistViewer.js b/src/scripts/playlistViewer.js index 8b2ca3a635..512a15281b 100644 --- a/src/scripts/playlistViewer.js +++ b/src/scripts/playlistViewer.js @@ -39,8 +39,9 @@ async function init(page, item) { playlistId: item.Id, userId: apiClient.getCurrentUserId() }) - .catch(() => { + .catch(err => { // If a user doesn't have access, then the request will 404 and throw + console.info('[PlaylistViewer] Failed to fetch playlist permissions', err); return { data: {} }; }); isEditable = !!data.CanEdit;