Socket
Socket
Sign inDemoInstall

xero-node

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xero-node - npm Package Compare versions

Comparing version 2.14.0 to 2.15.0

test/core/error_tests.js

16

lib/application.js

@@ -147,2 +147,3 @@ 'use strict';

var errObj = new Error(method.toUpperCase() + ' call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = data;

@@ -161,2 +162,3 @@ reject(errObj);

var errObj = new Error(method.toUpperCase() + ' call failed with: ' + err.statusCode + ' and exception: ' + JSON.stringify(exception, null, 2));
errObj.statusCode = err.statusCode;
reject(errObj);

@@ -180,2 +182,3 @@ callback && callback(errObj);

var errObj = new Error(method.toUpperCase() + ' call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = err.data;

@@ -215,2 +218,3 @@ reject(errObj);

var errObj = new Error('DELETE call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = data;

@@ -224,2 +228,3 @@ reject(errObj);

var errObj = new Error('DELETE call failed with: ' + err.statusCode + ' and message: ' + err.data);
errObj.statusCode = err.statusCode;
reject(errObj);

@@ -245,2 +250,3 @@ callback && callback(errObj);

var errObj = new Error('DELETE call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = err.data;

@@ -287,2 +293,3 @@ reject(errObj);

var errObj = new Error('GET call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = err.data;

@@ -319,3 +326,3 @@ reject(errObj);

}
if (!_.isEmpty(params)) {

@@ -341,2 +348,3 @@ url += '?' + querystring.stringify(params);

var errObj = new Error('GET call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = data;

@@ -351,2 +359,3 @@ reject(errObj);

var errObj = new Error('GET call failed with: ' + err.statusCode + ' and exception: ' + JSON.stringify(data.ApiException, null, 2));
errObj.statusCode = err.statusCode;
reject(errObj);

@@ -395,2 +404,3 @@ callback && callback(errObj);

var errObj = new Error('GET call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = err.data;

@@ -416,2 +426,3 @@ reject(errObj);

var errObj = new Error('GET call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
errObj.data = dataParts;

@@ -423,2 +434,3 @@ reject(errObj);

var errObj = new Error('GET call failed with: ' + err.statusCode);
errObj.statusCode = err.statusCode;
reject(errObj);

@@ -491,3 +503,2 @@ callback && callback(errObj);

.catch(function(err) {
console.error(err);
throw err;

@@ -513,3 +524,2 @@ })

.catch(function(err) {
console.error(err);
throw err;

@@ -516,0 +526,0 @@ })

2

package.json
{
"name": "xero-node",
"version": "2.14.0",
"version": "2.15.0",
"description": "Xero API Wrapper for all application types",

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

@@ -231,2 +231,4 @@ xero-node (alpha)

* 2.15.0
- Adds 'statusCode' property to errors returned from API calls #153
* 2.14.0

@@ -233,0 +235,0 @@ - Make npm the default over yarn #136

@@ -75,2 +75,3 @@ 'use strict';

);
importTest('error_tests', `${__dirname}/core/error_tests.js`);
});

@@ -77,0 +78,0 @@

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