Skip to content

Instantly share code, notes, and snippets.

View arcdev1's full-sized avatar

Bill Sourour arcdev1

  • Arcnovus
  • Ottawa, Canada
View GitHub Profile
/**
* This Gist has been modified to use a custom flag on the config object instead of an HTTP Header in order to
* indicate wether or not to specifically handle the error.
* THIS CODE IS UNTESTED!!
*/
//var HEADER_NAME = 'MyApp-Handle-Errors-Generically'; // We don't want to use Headers, we use a flag on the config object instead
var specificallyHandleInProgress = false;
angular.module('myApp').factory('RequestsErrorHandler', ['$q', function($q) {