Merge pull request #3074 from overleaf/msm-update-oerror-logger-v3

Update o-error to v3 and logger-sharelatex to v3

GitOrigin-RevId: 5e6386f65b7893949336aa4ff021212aebd98f4a
This commit is contained in:
Miguel Serrano
2020-08-11 11:28:29 +02:00
committed by Copybot
parent 42c917d909
commit d2845d9a38
27 changed files with 446 additions and 719 deletions

View File

@@ -694,17 +694,13 @@ async function createNewFolderStructure(projectId, docEntries, fileEntries) {
}
).exec()
if (project == null) {
throw new OError({
message: 'project not found or folder structure already exists',
info: { projectId }
throw new OError('project not found or folder structure already exists', {
projectId
})
}
return project.version
} catch (err) {
throw new OError({
message: 'failed to create folder structure',
info: { projectId }
}).withCause(err)
throw OError.tag(err, 'failed to create folder structure', { projectId })
}
}