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

node-vault

Package Overview
Dependencies
Maintainers
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-vault - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

2

package.json
{
"name": "node-vault",
"version": "0.8.0",
"version": "0.9.0",
"description": "Javascript client for HashiCorp's Vault",

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

@@ -9,2 +9,14 @@ 'use strict';

class VaultError extends Error {}
class ApiResponseError extends VaultError {
constructor(message, response) {
super(message);
this.response = {
statusCode: response.statusCode,
body: response.body,
};
}
}
module.exports = (config = {}) => {

@@ -25,3 +37,3 @@ // load conditional dependencies

function handleVaultResponse(response) {
if (!response) return Promise.reject(new Error('No response passed'));
if (!response) return Promise.reject(new VaultError('No response passed'));
debug(response.statusCode);

@@ -39,3 +51,3 @@ if (response.statusCode !== 200 && response.statusCode !== 204) {

}
const error = new Error(message);
const error = new ApiResponseError(message, response);
return Promise.reject(error);

@@ -42,0 +54,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