]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/comment.ts
Fix 500 on unknown thread
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / comment.ts
index ccd76c0933cef487940d8764e0cfa97aa8e6e1f7..020d0b10470b709a989bbb48762b281cc05c5112 100644 (file)
@@ -160,6 +160,10 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo
     }
   }
 
+  if (resultList.data.length === 0) {
+    return res.sendStatus(404)
+  }
+
   return res.json(buildFormattedCommentTree(resultList))
 }