code: function newError(errorCode, errorMessage) {
  		
  		var errObj;
  		
  		if (_.isObject(errorCode)) {
  			errObj = errorCode;
  		}
  		else if (typeof(errorCode) === 'number') {
  			errObj = {
  				errorCode: errorCode,
  			};
  			
  			if (errorMessage) {
  				errObj.message = errorMessage;
  			}
  		}
  		else {
  			errObj = {errorCode: 500};
  		}
  		
  		return new Promise(function(resolve, reject) {
  			reject(errObj);
  		});
  	}
docs: returns a promise that resolves to an error