Skip to content

Commit

Permalink
fix(demo): Log demo errors to the console (#68)
Browse files Browse the repository at this point in the history
When a "request fails" in the demo, sometimes it is because of an exception elsewhere in the process.  This logs those errors to the console so that they can be traced and fixed.
  • Loading branch information
joeyparrish authored May 14, 2024
1 parent 0d51ba6 commit ccfb179
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ document.addEventListener('DOMContentLoaded', () => {
window.results.textContent =
formatObjectToString(mksa.getConfiguration());
} catch (error) {
console.log(error);
window.results.textContent = formatObjectToString({error: error.message});
}
}); // emeRun click listener
Expand Down Expand Up @@ -113,6 +114,7 @@ document.addEventListener('DOMContentLoaded', () => {
formatObjectToString(mksa.getConfiguration());
}
} catch (error) {
console.log(error);
window.results.textContent = formatObjectToString({error: error.message});
}
}); // mcRun click listener
Expand Down

0 comments on commit ccfb179

Please sign in to comment.