Add note on why it is BAD_STATE
This commit is contained in:
@@ -638,7 +638,7 @@ function scheduleTask(appId, args, values, callback) {
|
||||
|
||||
appdb.setTask(appId, values, function (error) {
|
||||
if (error && error.reason === DatabaseError.ALREADY_EXISTS) return callback(new AppsError(AppsError.ALREADY_EXISTS, error.message));
|
||||
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(new AppsError(AppsError.BAD_STATE));
|
||||
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(new AppsError(AppsError.BAD_STATE)); // could be because app went away OR a taskId exists
|
||||
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error));
|
||||
|
||||
appTaskManager.scheduleTask(appId, taskId, function (error) {
|
||||
|
||||
Reference in New Issue
Block a user