[Persistence] Tweak logic

Tweak approach for revision conflict detection; particularly,
use .reject instead of throw to avoid logging of the failure
unnecessarily. WTD-1033.
This commit is contained in:
Victor Woeltjen
2015-03-20 15:53:40 -07:00
parent d8e1f69b37
commit b604af2aa7
2 changed files with 11 additions and 9 deletions

View File

@ -78,11 +78,11 @@ define(
// Load the updated model, then reject the promise
return get(key).then(function (model) {
error.model = model;
throw error;
return $q.reject(error);
});
}
// Reject the promise
throw error;
return $q.reject(error);
}
// Check the response to a create/update/delete request;