code: function (promise){
      		promise.success = function (fn) {
  	            promise.then(fn);
  	            return promise;
  	        };
  
  	        promise.error = function (fn) {
  	            promise.then(null, fn);
  	            return promise;
  	        };
      	}
docs: Decorate the promise object.
  @param promise The promise object.