From 2df4dc1bfc2f90c7962dd99cafc12c7c0e71fb84 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 24 Apr 2023 19:29:35 -0400 Subject: [PATCH] Updated file not found error message in /stream --- backend/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app.js b/backend/app.js index 90e5ccd..c23aefd 100644 --- a/backend/app.js +++ b/backend/app.js @@ -1638,7 +1638,7 @@ app.get('/api/stream', optionalJwt, async (req, res) => { else file_path = null; } if (!fs.existsSync(file_path)) { - logger.error(`File ${file_path} could not be found! UID: ${uid}, ID: ${file_obj.id}`); + logger.error(`File ${file_path} could not be found! UID: ${uid}, ID: ${file_obj && file_obj.id}`); } const stat = fs.statSync(file_path); const fileSize = stat.size;