Check How can I handle errors in the FAQ. You need to pass in a second function into the then()
method of the promise to act as an error handler.
Restangular.all("accounts").getList().then(function() {
console.log("All ok");
}, function(response) {
console.log("Error with status code", response.status);
});