From 4cc1cfec5217ca077c1edb773d7e7cd22f1074a2 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sat, 27 Jan 2024 02:48:56 +1100 Subject: [PATCH] Log the error messages returned by the API --- src/modules/YTModule.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/YTModule.ts b/src/modules/YTModule.ts index 9dfdf98..2b9b542 100644 --- a/src/modules/YTModule.ts +++ b/src/modules/YTModule.ts @@ -29,8 +29,8 @@ export default async(client:TClient)=>{ headers: {'User-Agent':`${client.user.username} - YTModule/undici`} }).then(async resp=>Data = await resp.body.json()); YTChannelName = Data.items[0].snippet.channelTitle; - } catch { - Logger.console('log', 'YTModule', `Failed to get video data for "${YTChannelName}" from YouTube API`); + } catch (err) { + Logger.console('log', 'YTModule', `Failed to get video data for "${YTChannelID}" from YouTube API: ${err}`); } if (!Data) return;