Merge pull request #3117 from overleaf/sk-block-tpds-update-on-archived-project

Block TPDS update on archived/trashed project

GitOrigin-RevId: 7db41a313b03721b93cbb601add6f91ae31f3f2a
This commit is contained in:
Timothée Alby
2020-08-25 02:04:17 +00:00
committed by Copybot
parent 750a20491d
commit 1ff2c6ce00
8 changed files with 350 additions and 22 deletions
@@ -45,6 +45,12 @@ module.exports = {
'tpds update failed to be processed, too many requests'
)
return res.sendStatus(429)
} else if (err.name === 'ProjectIsArchivedOrTrashedError') {
logger.info(
{ err, user_id, filePath, projectName },
'tpds project is archived'
)
return res.sendStatus(409)
} else if (err.message === 'project_has_too_many_files') {
logger.warn(
{ err, user_id, filePath },