mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 05:01:11 +00:00
Warn when project or file is not found (#16740)
GitOrigin-RevId: ab71000492c3b2f2ba02ad6fd768b7c2e4563ed7
This commit is contained in:
parent
fefec2c1bf
commit
b38d6a85c9
1 changed files with 11 additions and 4 deletions
|
@ -15,10 +15,17 @@ module.exports = {
|
|||
{ project_id: projectId, element_id: fileId, type: 'file' },
|
||||
function (err, file) {
|
||||
if (err) {
|
||||
logger.err(
|
||||
{ err, projectId, fileId, queryString },
|
||||
'error finding element for downloading file'
|
||||
)
|
||||
if (err.name === 'NotFoundError') {
|
||||
logger.warn(
|
||||
{ err, projectId, fileId, queryString },
|
||||
'entity not found when downloading file'
|
||||
)
|
||||
} else {
|
||||
logger.err(
|
||||
{ err, projectId, fileId, queryString },
|
||||
'error finding element for downloading file'
|
||||
)
|
||||
}
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
FileStoreHandler.getFileStream(
|
||||
|
|
Loading…
Reference in a new issue