diff --git a/functions/index.js b/functions/index.js index 6f1384ed7..f83c9f8a4 100644 --- a/functions/index.js +++ b/functions/index.js @@ -173,11 +173,11 @@ exports.checkIfNeedsToChangeName = functions.https.onCall((request,response) => }) exports.testCompleted = functions.https.onCall((request,response) => { - if(request.uid === undefined || request.obj === undefined){ - console.error(`error saving result for ${request.uid} - missing input`); - return -1; - } try{ + if(request.uid === undefined || request.obj === undefined){ + console.error(`error saving result for ${request.uid} - missing input`); + return -1; + } let obj = request.obj;