From 2fa1b24f4c124e7a85322b68353ff6c1381dc5a5 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 11 Jun 2020 18:49:06 +0100 Subject: [PATCH] made sure to access the message key when showing firestore errors --- functions/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/index.js b/functions/index.js index 4f052af5d..d24b18502 100644 --- a/functions/index.js +++ b/functions/index.js @@ -102,7 +102,7 @@ exports.changeName = functions.https.onCall((request,response) => { console.log(`${request.uid} changed their name to ${request.name} - done`); return 1; }).catch(e => { - console.error(`${request.uid} tried to change their name to ${request.name} - ${e}`); + console.error(`${request.uid} tried to change their name to ${request.name} - ${e.message}`); return -1; }) }else{ @@ -308,7 +308,7 @@ exports.testCompleted = functions.https.onCall((request,response) => { } }); }).catch(e => { - console.error(`error saving result for ${request.uid} - ${e}`); + console.error(`error saving result for ${request.uid} - ${e.message}`); return -1; }); }catch(e){ @@ -335,7 +335,7 @@ exports.addTag = functions.https.onCall((request,response) => { console.log(`user ${request.uid} created a tag: ${request.name}`); return 1; }).catch(e => { - console.error(`error while creating tag for user ${request.uid}: ${e}`); + console.error(`error while creating tag for user ${request.uid}: ${e.message}`); }) }