mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Trying some error handling for a missing TaskLog error I saw.
This commit is contained in:
parent
26d2816071
commit
104a405453
1 changed files with 2 additions and 4 deletions
|
@ -480,11 +480,9 @@ verifyClientResponse = (responseObject, callback) ->
|
|||
callback null, responseObject
|
||||
|
||||
fetchTaskLog = (responseObject, callback) ->
|
||||
findParameters =
|
||||
_id: responseObject.taskID
|
||||
query = TaskLog
|
||||
.findOne(findParameters)
|
||||
query = TaskLog.findOne _id: responseObject.taskID
|
||||
query.exec (err, taskLog) =>
|
||||
return callback new Error("Couldn't find TaskLog for _id #{responseObject.taskID}!") unless taskLog
|
||||
@taskLog = taskLog
|
||||
#log.info "Fetched task log!"
|
||||
callback err, taskLog.toObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue