Merge pull request #5734 from overleaf/ab-handle-project-zip-not-existing

Handle case of not existing project ID when zipping projects for download

GitOrigin-RevId: 601b14ef0217c27dc50ef0442f7e81db35642b6d
This commit is contained in:
Alf Eaton
2021-11-17 09:03:29 +00:00
committed by Copybot
parent 1fc57aadcf
commit a15e1bdc07
2 changed files with 82 additions and 0 deletions
@@ -23,6 +23,13 @@ module.exports = ProjectZipStreamManager = {
if (error) {
return cb(error)
}
if (!project) {
logger.log(
{ projectId },
'cannot append project to zip stream: project not found'
)
return cb()
}
logger.log(
{ projectId, name: project.name },
'appending project to zip stream'