From 8102e87705ef2c8520746e5a3778c9a213b791d5 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Mon, 31 Aug 2020 11:03:30 -0400 Subject: [PATCH] Log wizard error if in debug mode --- lib/wizard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/wizard.js b/lib/wizard.js index 3b892af..a4862e3 100644 --- a/lib/wizard.js +++ b/lib/wizard.js @@ -77,7 +77,11 @@ const list = async conf => { userId = device.uid; foundAPIRegion = region; } - } catch { + } catch (error) { + if (process.env.DEBUG) { + console.error(error); + } + console.error(colors.red('There was an issue fetching that device. Make sure your account is linked and the ID is correct.')); // eslint-disable-next-line unicorn/no-process-exit