From 54455bf6250a50e0625203d46faacedcb62bee27 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 24 Dec 2019 11:05:11 -0500 Subject: [PATCH] Made errors respond 502 instead of 409. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2e0616b..e287ad3 100644 --- a/index.js +++ b/index.js @@ -207,8 +207,8 @@ app.get('/api/postVideoSponsorTimes', async function (req, res) { //not a duplicate, execute query db.prepare("INSERT INTO sponsorTimes VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)").run(videoID, startTime, endTime, startingVotes, UUID, userID, timeSubmitted, 0, shadowBanned, function (err) { if (err) { - //a DB change probably occurred, respond as if it is a duplicate - res.sendStatus(409); + //a DB change probably occurred + res.sendStatus(502); console.log("Error when putting sponsorTime in the DB: " + videoID + ", " + startTime + ", " + "endTime" + ", " + userID); } else {