mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 10:11:25 +08:00
fix(update-object-task): Task MUST return a status code after rolling back
This commit is contained in:
parent
3aa7801d89
commit
a8effbc201
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ class UpdateNylasObjectsTask extends Task
|
||||||
return Promise.resolve(Task.Status.Finished)
|
return Promise.resolve(Task.Status.Finished)
|
||||||
.catch APIError, (err) =>
|
.catch APIError, (err) =>
|
||||||
if err.statusCode in NylasAPI.PermanentErrorCodes
|
if err.statusCode in NylasAPI.PermanentErrorCodes
|
||||||
return @performLocal(reverting: true)
|
@performLocal(reverting: true).then =>
|
||||||
|
return Promise.resolve(Task.Status.Finished)
|
||||||
else
|
else
|
||||||
return Promise.resolve(Task.Status.Retry)
|
return Promise.resolve(Task.Status.Retry)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue