module.exports = function(Magazine) {
  Magazine.beforeCreate = function(next, model) {
    console.log('> Magazine.beforeCreate triggered');

    var coffeeShopService = Magazine.app.dataSources.CoffeeShopService;

    coffeeShopService.find(function(unknown, response, context) {
      //what is the first arg? its not err because its always null
      //is the last argument actually context?
      //response returns error if there is one
      var error = response.error;
      if (error) {
        next('> error: ' + error.stack);
      }
      model.coffeeShops = response;
      console.log('> coffee shops fetched successfully from remote server');
      //verify via `curl localhost:3000/api/Magazines`
      next();
    });
  };
};

@@ -249,15 +249,11 @@
 ion(
-unknown
+err
 , re
@@ -281,207 +281,70 @@
     
-//what is the first arg? its not err because its always null%0A      //is the last argument actually context?%0A      //response returns error if there is one%0A      var error = response.error;%0A      if (
+if (err) throw err; //error making request%0A      if (response.
 erro
@@ -363,16 +363,25 @@
  next('%3E
+ response
  error: 
@@ -384,16 +384,25 @@
 or: ' + 
+response.
 error.st

Fix error logging local-server