Commit 71d92355 by Sam Padgett Committed by GitHub

Merge pull request #103 from jwforres/project-service-reject

Project service needs to return a rejected promise from its error handler
parents 98a33d9f e740603d
......@@ -2801,6 +2801,7 @@ angular.module('openshiftCommonServices')
"error_description": description
})
.toString());
return $q.reject();
});
});
},
......
......@@ -4435,6 +4435,7 @@ angular.module('openshiftCommonServices')
"error_description": description
})
.toString());
return $q.reject();
});
});
},
......
......@@ -1884,10 +1884,10 @@ return context.project = project, context.projectPromise.resolve(project), [ pro
}, function(e) {
context.projectPromise.reject(e);
var description = "The project could not be loaded.", type = "error";
403 === e.status ? (description = "The project " + context.projectName + " does not exist or you are not authorized to view it.", type = "access_denied") :404 === e.status && (description = "The project " + context.projectName + " does not exist.", type = "not_found"), $location.url(URI("error").query({
return 403 === e.status ? (description = "The project " + context.projectName + " does not exist or you are not authorized to view it.", type = "access_denied") :404 === e.status && (description = "The project " + context.projectName + " does not exist.", type = "not_found"), $location.url(URI("error").query({
error:type,
error_description:description
}).toString());
}).toString()), $q.reject();
});
});
},
......
......@@ -59,6 +59,7 @@ angular.module('openshiftCommonServices')
"error_description": description
})
.toString());
return $q.reject();
});
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment