mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 12:35:51 +00:00
better error when project creation fails
This commit is contained in:
parent
eacb19fac9
commit
28bcf83d87
1 changed files with 4 additions and 2 deletions
|
@ -107,8 +107,10 @@ class User
|
|||
}, (error, response, body) ->
|
||||
return callback(error) if error?
|
||||
if !body?.project_id?
|
||||
console.error "SOMETHING WENT WRONG CREATING PROJECT", response.statusCode, response.headers["location"], body
|
||||
callback(null, body.project_id)
|
||||
error = new Error("SOMETHING WENT WRONG CREATING PROJECT", response.statusCode, response.headers["location"], body)
|
||||
callback error
|
||||
else
|
||||
callback(null, body.project_id)
|
||||
|
||||
deleteProject: (project_id, callback=(error)) ->
|
||||
@request.delete {
|
||||
|
|
Loading…
Add table
Reference in a new issue