mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-06 04:32:22 +00:00
Merge pull request #2144 from overleaf/spd-unhandled-missing-project
Handle errors when projects are deleted while git-bridge requests are ongoing GitOrigin-RevId: 488c3d480f2bb58aebaac5bdcbb412009c14322a
This commit is contained in:
parent
561d14bbb6
commit
adbe19fa12
2 changed files with 5 additions and 3 deletions
|
@ -110,6 +110,10 @@ const ProjectEntityHandler = {
|
|||
if (err != null) {
|
||||
return callback(err)
|
||||
}
|
||||
if (project == null) {
|
||||
return callback(new Errors.NotFoundError('project not found'))
|
||||
}
|
||||
|
||||
return ProjectEntityHandler.getAllEntitiesFromProject(project, callback)
|
||||
})
|
||||
},
|
||||
|
|
|
@ -280,9 +280,7 @@ module.exports = ProjectLocator = {
|
|||
return callback(err)
|
||||
}
|
||||
if (project == null) {
|
||||
return callback(
|
||||
`project could not be found for finding a element ${project._id}`
|
||||
)
|
||||
return callback('Tried to find an element for a null project')
|
||||
}
|
||||
if (needlePath === '' || needlePath === '/') {
|
||||
return callback(null, project.rootFolder[0], 'folder')
|
||||
|
|
Loading…
Add table
Reference in a new issue