From 1139b59346e7fcfb4fe8ad0c2c9b3e326c75b854 Mon Sep 17 00:00:00 2001 From: Finn Date: Fri, 25 Nov 2016 12:20:06 -0800 Subject: [PATCH] Catch some exceptions with raven-js --- piston/static/js/register.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/piston/static/js/register.js b/piston/static/js/register.js index aeac33b..1d82659 100644 --- a/piston/static/js/register.js +++ b/piston/static/js/register.js @@ -43,9 +43,15 @@ function onSubmit(e) { serviceWorkerRegistration.pushManager.subscribe({userVisibleOnly: true}).then((subscription) => { document.querySelector("input[name='subscription']").value = JSON.stringify(subscription.toJSON()); document.querySelector(".approval-form").submit(); + }).catch((e) => { + var exception = Raven.captureException(e); + console.log(e, exception); }); }); } + }).catch((e) => { + var exception = Raven.captureException(e); + console.log(e, exception); }); }