Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case 'Neo.ClientError.Security.AuthenticationFailed':
case 'Neo.ClientError.Security.AuthenticationRateLimit':
case 'Neo.ClientError.Security.AuthorizationFailed':
error.name = 'Neo4jAuthError';
break;
default:
error.name = 'Neo4jError';
break;
}
throw error;
};
// This adds extra methods to the promises returned by Bluebird so that
// we can use these in place of `then()`.
sourceifyPromises(Promise.prototype, responseParser);
// This only does something in the case of ES6 Promises.
tapifyPromises(Promise.prototype);
// This create promise-returning versions of all of the standard
// node-style callback-returning methods.
Neo4j.prototype = thenifyAll(Neo4j.prototype);
module.exports = function (url, options) {
options = options || {};
options.idName = options.idName || 'id';
url = url || "http://localhost:7474/";
var hasCredentials = options.auth !== undefined;
var client;
error.name = 'Neo4jAuthError';
break;
default:
error.name = 'Neo4jError';
break;
}
throw error;
};
// This adds extra methods to the promises returned by Bluebird so that
// we can use these in place of `then()`.
sourceifyPromises(Promise.prototype, responseParser);
// This only does something in the case of ES6 Promises.
tapifyPromises(Promise.prototype);
// This create promise-returning versions of all of the standard
// node-style callback-returning methods.
Neo4j.prototype = thenifyAll(Neo4j.prototype);
module.exports = function (url, options) {
options = options || {};
options.idName = options.idName || 'id';
url = url || "http://localhost:7474/";
var hasCredentials = options.auth !== undefined;
var client;
if (hasCredentials) {
var username = options.auth.username;
var password = options.auth.password;