fix(update-object-task): Task MUST return a status code after rolling back

This commit is contained in:
Ben Gotow 2015-07-21 11:58:09 -07:00
parent 3aa7801d89
commit a8effbc201

View file

@ -54,7 +54,8 @@ class UpdateNylasObjectsTask extends Task
return Promise.resolve(Task.Status.Finished)
.catch APIError, (err) =>
if err.statusCode in NylasAPI.PermanentErrorCodes
return @performLocal(reverting: true)
@performLocal(reverting: true).then =>
return Promise.resolve(Task.Status.Finished)
else
return Promise.resolve(Task.Status.Retry)