Using an Existing Function As a Handler

    .then(null, error => $log.error(error));

can be replaced with:

    .then(null, $log.error);

Let's make sure we understand why.