function ProductsController(productsService) {
  const vm = this;
  vm.products = [];

  vm.fetch = url => {
    return productsService.fetch(url)
    .then((products) => {
      vm.products = products;
    });
  };
}

ProductsController.$inject = ['productsService'];

export {ProductsController};

@@ -36,16 +36,30 @@
 sService
+, popupService
 ) %7B%0A  co
@@ -220,17 +220,151 @@
   %7D)
-;%0A  %7D;%0A%7D%0A
+%0A    .catch((error) =%3E %7B%0A      popupService.show('error requesting products: ' + error.message);%0A    %7D);%0A  %7D;%0A%7D%0A%0A//noinspection JSValidateTypes
 %0APro

make test bar green