From 3739548d0d2e7beeefd4ef11c18e3fd137e9731d Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 28 Feb 2020 08:39:59 +0100 Subject: [PATCH] Added error handling for worker not found --- back/methods/chat/sendCheckingPresence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index 5a4ee2fcf..f67fb6942 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -29,7 +29,7 @@ module.exports = Self => { const userId = ctx.req.accessToken.userId; if (!account) - throw new Error(`Could not send message to worker id ${workerId} from user ${userId}`); + throw new Error(`Could not send message "${message}" to worker id ${workerId} from user ${userId}`); const query = `SELECT worker_isWorking(?) isWorking`; const [result] = await Self.rawSql(query, [workerId]);