Is there a way to return a promise and trigger its failure block right away? Check out this unconventional method:
if (fail) {
var q = $q.deferred();
$timeout(function() {
q.reject("")
}, 1);
return q.promise;
} else {
return $http.get("/").then(function(data) {});
}