From 48b2807120928654ae52ea78bd7d2d9824eaa05e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 20 Feb 2022 09:35:54 -0500 Subject: Add support for logging Anki errors on the settings page (#2073) --- ext/js/comm/anki.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/comm') diff --git a/ext/js/comm/anki.js b/ext/js/comm/anki.js index 3254873f..54b12384 100644 --- a/ext/js/comm/anki.js +++ b/ext/js/comm/anki.js @@ -183,7 +183,7 @@ class AnkiConnect { }); } catch (e) { const error = new Error('Anki connection failure'); - error.data = {action, params}; + error.data = {action, params, originalError: e}; throw error; } @@ -200,7 +200,7 @@ class AnkiConnect { result = JSON.parse(responseText); } catch (e) { const error = new Error('Invalid Anki response'); - error.data = {action, params, status: response.status, responseText}; + error.data = {action, params, status: response.status, responseText, originalError: e}; throw error; } -- cgit v1.2.3