mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 08:23:57 -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
|
callback null, responseObject
|
||||||
|
|
||||||
fetchTaskLog = (responseObject, callback) ->
|
fetchTaskLog = (responseObject, callback) ->
|
||||||
findParameters =
|
query = TaskLog.findOne _id: responseObject.taskID
|
||||||
_id: responseObject.taskID
|
|
||||||
query = TaskLog
|
|
||||||
.findOne(findParameters)
|
|
||||||
query.exec (err, taskLog) =>
|
query.exec (err, taskLog) =>
|
||||||
|
return callback new Error("Couldn't find TaskLog for _id #{responseObject.taskID}!") unless taskLog
|
||||||
@taskLog = taskLog
|
@taskLog = taskLog
|
||||||
#log.info "Fetched task log!"
|
#log.info "Fetched task log!"
|
||||||
callback err, taskLog.toObject()
|
callback err, taskLog.toObject()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue