From 335873589bdf5a0182a278de661ab85f976cdc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 16 Aug 2024 14:39:24 -0400 Subject: [PATCH] test: add logs for test failures --- src/plugins/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/index.js b/src/plugins/index.js index f3a42aa01a..37980dd55c 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -155,6 +155,7 @@ Plugins.get = async function (id) { const url = `${nconf.get('registry') || 'https://packages.nodebb.org'}/api/v1/plugins/${id}`; const { response, body } = await request.get(url); if (!response.ok) { + console.log(response); throw new Error(`[[error:unable-to-load-plugin, ${id}]]`); } let normalised = await Plugins.normalise([body ? body.payload : {}]); @@ -171,6 +172,7 @@ Plugins.list = async function (matching) { try { const { response, body } = await request.get(url); if (!response.ok) { + console.log(response); throw new Error(`[[error:unable-to-load-plugins-from-nbbpm]]`); } return await Plugins.normalise(body); @@ -184,6 +186,7 @@ Plugins.listTrending = async () => { const url = `${nconf.get('registry') || 'https://packages.nodebb.org'}/api/v1/analytics/top/week`; const { response, body } = await request.get(url); if (!response.ok) { + console.log(response); throw new Error(`[[error:unable-to-load-trending-plugins]]`); } return body;