AngularJS based $http circuit-breaker pattern implementation