Handle missing projects properly in file-count script

GitOrigin-RevId: 5968fc3c6646a6e75b2b84440d59d9c0cbcead5e
This commit is contained in:
Simon Detheridge 2020-04-29 11:50:34 +01:00 committed by Copybot
parent 07cd6b257a
commit ff38ea9533

View file

@ -11,6 +11,9 @@ async function countFiles() {
for await (const projectId of rl) {
try {
const project = await ProjectGetter.promises.getProject(projectId)
if (!project) {
throw new Errors.NotFoundError('project not found')
}
const {
files,
docs