Merge pull request #2203 from overleaf/jel-registration-institution-sso

Registration request with an institution email

GitOrigin-RevId: c544d8af4f6ca91addb638e02e9fe26acad7fbdb
This commit is contained in:
Jessica Lawshe 2019-10-07 10:21:04 -05:00 committed by sharelatex
parent 45e5808a35
commit e20c93b581
2 changed files with 9 additions and 1 deletions

View file

@ -333,7 +333,7 @@ const ProjectEntityHandler = {
return callback(err)
}
if (project == null) {
return callback(Errors.NotFoundError('no project'))
return callback(new Errors.NotFoundError('no project'))
}
return ProjectEntityHandler._getAllFoldersFromProject(project, callback)
})

View file

@ -74,6 +74,14 @@ module.exports = V1Api = {
error = new Errors.ForbiddenError('overleaf v1 returned forbidden')
error.statusCode = response.statusCode
return callback(error)
} else if (response.statusCode === 404) {
error = new Errors.NotFoundError(
`overleaf v1 returned non-success code: ${response.statusCode} ${
options.method
} ${options.uri}`
)
error.statusCode = response.statusCode
return callback(error)
} else {
error = new Error(
`overleaf v1 returned non-success code: ${response.statusCode} ${