From 4880d2c4b919b0244758e5baac083f55192363fa Mon Sep 17 00:00:00 2001 From: Hiruthic <56349092+hiruthicShaSS@users.noreply.github.com> Date: Sun, 24 Apr 2022 21:43:52 +0530 Subject: [PATCH] Adding error param in catch callback --- lib/profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/profile.js b/lib/profile.js index 822294e..247c3dd 100644 --- a/lib/profile.js +++ b/lib/profile.js @@ -25,7 +25,7 @@ module.exports = { return await axios.get(url + username).then(res => { return res.data.items - }).catch(() => handleError(error, username)) + }).catch((error) => handleError(error, username)) }, getRecentPost: async function (username, post) { if (typeof username !== "string") throw new TypeError("username must be of type string") @@ -43,6 +43,6 @@ module.exports = { message: `Recent post ${post} does not exist, '@${username}' only has ${res.data.items} posts.` } } - }).catch(() => handleError(username)) + }).catch((_) => handleError(username)) } }