From 2a713deeefacf0c602d766e016b840417bbc2e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Wed, 20 Feb 2019 11:11:14 -0600 Subject: [PATCH] Debugging --- app/sockets.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/sockets.js b/app/sockets.js index ce52756..7e7a0d5 100644 --- a/app/sockets.js +++ b/app/sockets.js @@ -387,11 +387,10 @@ async function newsletterSubscribe(data, socket) { const response = JSON.parse(error.body); if (!response.success) { - messageSlack( - "\n" + - "> *NEWSLETTER ERROR:* ```" + response.error + "```" + "\n" + - `> _Cause: ${email} interacted with the form_\n` - ); + messageSlack({ + message: `via ${email}: ${response.error}`, + title: "NEWSLETTER ERROR" + }); return send(socket, { class: "error", @@ -401,11 +400,10 @@ async function newsletterSubscribe(data, socket) { }); } - messageSlack( - "\n" + - "> *NEWSLETTER ERROR:* ```¯\\_(ツ)_/¯ This should be an unreachable error```" + "\n" + - `> _Cause: ${email} interacted with the form_\n` - ); + messageSlack({ + message: `via ${email} (strange error): ${response.error}`, + title: "NEWSLETTER ERROR" + }); return send(socket, { class: "error", @@ -454,7 +452,7 @@ async function syncWithApi(data, socket) { // TEMPORARY messageSlack({ - message: error, + message: error.toString(), // let's see if I get the whole thing title: "DEVELOPER PROGRAM ERROR" }); // TEMPORARY