Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arangojs

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangojs - npm Package Compare versions

Comparing version 4.0.0-alpha2 to 4.0.0-alpha3

26

lib/connection.js

@@ -16,2 +16,6 @@ 'use strict';

var _httpErrors = require('http-errors');
var _httpErrors2 = _interopRequireDefault(_httpErrors);
var _extend = require('extend');

@@ -126,11 +130,17 @@

}, function (err, res) {
if (err) callback(err);else if (res.headers['content-type'].match(MIME_JSON)) {
try {
res.rawBody = res.body;
res.body = JSON.parse(res.rawBody);
} catch (e) {
return callback((0, _extend2['default'])(e, { response: res }));
if (err) callback(err);else {
res.rawBody = res.body;
if (res.headers['content-type'].match(MIME_JSON)) {
try {
res.body = JSON.parse(res.rawBody);
} catch (e) {
return callback((0, _extend2['default'])(e, { response: res }));
}
}
if (!res.body.error) callback(null, res);else callback((0, _extend2['default'])(new _error2['default'](res.body), { response: res }));
} else callback(null, (0, _extend2['default'])(res, { rawBody: res.body }));
if (res.body && res.body.error && res.body.hasOwnProperty('code') && res.body.hasOwnProperty('errorMessage') && res.body.hasOwnProperty('errorNum')) {
callback((0, _extend2['default'])(new _error2['default'](res.body), { response: res }));
} else if (res.statusCode >= 400) {
callback((0, _extend2['default'])((0, _httpErrors2['default'])(res.statusCode), { response: res }));
} else callback(null, res);
}
});

@@ -137,0 +147,0 @@ return promise;

{
"name": "arangojs",
"version": "4.0.0-alpha2",
"version": "4.0.0-alpha3",
"description": "The official ArangoDB JavaScript driver.",

@@ -67,4 +67,5 @@ "main": "lib/index.js",

"extend": "^3.0.0",
"http-errors": "^1.3.1",
"linkedlist": "^1.0.1"
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc